스마트폰 접속시 모바일웹이동? 정보
스마트폰 접속시 모바일웹이동?본문
기존 홈페이지를 모바일 웹으로 하나더 만들려고 합니다.
기존 주소입력시 모바일웹이로 자동이동하게끔 하는 방법이 없는지요?
아시는분 답변 좀 부탁드려요
기존 주소입력시 모바일웹이로 자동이동하게끔 하는 방법이 없는지요?
아시는분 답변 좀 부탁드려요
댓글 전체

저같은 경우는 화면이 600보다 작으면 이동하게끔 해서 사용중입니다...
간지의제왕님 해상도 이동 어떻게 하죠?
<SCRIPT LANGUAGE="JavaScript">
function redirectPage() {
var url640x480 = "1.htm";
var url800x600 = "2.htm";
var url1024x768 = "3.htm";
var url1280x1024 = "4.htm";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url1280x1024;
}
// End -->
</script>
function redirectPage() {
var url640x480 = "1.htm";
var url800x600 = "2.htm";
var url1024x768 = "3.htm";
var url1280x1024 = "4.htm";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url1280x1024;
}
// End -->
</script>
<!-- 모바일 접속시 특정 페이지로 이동 시작 -->
<script type="text/javascript">
//script by kunmin, 2010-04-06
var mobilewords = new Array("Windows CE","iPhone","Android","iPod","PSP");
for (var word in mobilewords) {
if (navigator.userAgent.match(mobilewords[word]) != null ) {
//모바일 접속시 특정 페이지로 이동
location.href = "http://" + location.host + "/mobile.htm";
break;
}
}
</script>
<!-- 모바일 접속시 특정 페이지로 이동 끝-->
<script type="text/javascript">
//script by kunmin, 2010-04-06
var mobilewords = new Array("Windows CE","iPhone","Android","iPod","PSP");
for (var word in mobilewords) {
if (navigator.userAgent.match(mobilewords[word]) != null ) {
//모바일 접속시 특정 페이지로 이동
location.href = "http://" + location.host + "/mobile.htm";
break;
}
}
</script>
<!-- 모바일 접속시 특정 페이지로 이동 끝-->