반응형
모바일 기기로 접속한 경우 페이지 이동 javascript
<script language="javascript"> //Go to Mobile Page
// Mobile여부를 구분하기 위함
var uAgent = navigator.userAgent.toLowerCase();
// 아래는 모바일 장치들의 모바일 페이지 접속을위한 스크립트
var mobilePhones = new Array('iphone', 'ipod', 'ipad', 'android', 'blackberry', 'windows ce','nokia', 'webos', 'opera mini', 'sonyericsson', 'opera mobi', 'iemobile');
for (var i = 0; i < mobilePhones.length; i++)
if (uAgent.indexOf(mobilePhones[i]) != -1)
document.location = "http: //모바일 도메인";
</script>
반응형
'CSS_JS' 카테고리의 다른 글
css 를 활용한 퀵메뉴 (0) | 2019.11.19 |
---|---|
html 부드러운 스크롤 쉬운적용 jquery smooth scroll (0) | 2017.11.16 |
ie8 버전 이하 html5.js 적용하기 (0) | 2017.11.10 |
이미지 100% 팝업 띄우기 (0) | 2017.07.19 |
반응형 웹에서 이미지맵 사용하기 (0) | 2017.05.15 |