2018년 7월 11일 수요일
JavaScript - Detect mobile or browsers
http://detectmobilebrowsers.com/
or
-- JavaScript
var filter = "win16|win32|win64|mac|macintel";
if ( navigator.platform ) {
if ( filter.indexOf( navigator.platform.toLowerCase() ) < 0 ) {
//mobile alert('mobile 접속');
}
else {
//pc alert('pc 접속');
}
}
or
// 모바일 에이전트 구분
var isMobile = {
Android: function () {
return navigator.userAgent.match(/Android/i) == null ? false : true;
},
BlackBerry: function () {
return navigator.userAgent.match(/BlackBerry/i) == null ? false : true;
},
IOS: function () {
return navigator.userAgent.match(/iPhone|iPad|iPod/i) == null ? false : true;
},
Opera: function () {
return navigator.userAgent.match(/Opera Mini/i) == null ? false : true;
},
Windows: function () {
return navigator.userAgent.match(/IEMobile/i) == null ? false : true;
},
any: function () {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.IOS() || isMobile.Opera() || isMobile.Windows());
}
};
if(isMobile.any()){
if(isMobile.Android()){
}else if(isMobile.IOS()){
}else if(isMobile.BlackBerry()){
}else if(isMobile.Opera()){
}else if(isMobile.Windows()){
}
}
피드 구독하기:
댓글 (Atom)
MSSQL - Cursor vs Temp Table
#테이블 변수사용의 예 use pubs go declare @tmptable table ( nid int identity(1,1) not null, title varchar (80) not null ) -- 테이블 변수 선언 inse...
-
11 SQL Client for Productive Database Administration & Development Working as a web developer or database administrator, often n...
-
[JSON Serialization] JSON Serialization The JSON Serialization feature converts objects to and from JSON format. This can be use...
댓글 없음:
댓글 쓰기