사용자함수 웹페이지 접근 단말기 (모바일인지) 체크하기
페이지 정보
작성자 너갱이 작성일 15-05-15 17:56 조회 5,462 댓글 0본문
//모바일접근 체크..
var Mobile = false;var AgentStr = navigator.userAgent.toLowerCase();
var MobileArr = ['iphone','ipod','android','blackberry','windows ce','nokia','webos','opera mini','sonyericsson','opera mobi','iemobile'];
for (var model in MobileArr){
if (AgentStr.indexOf(MobileArr[model]) != -1){
Mobile = true;
break;
}
}
댓글목록 0
등록된 댓글이 없습니다.
