모바일로 접속했을때..왜 이동이 안되는지..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<TITLE>모조리 모바일 웹</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<meta name="viewport" content="user-scalable=auto, initial-scale=1.0, maximun-scale=1.0, minimum-scale=1.0, width= device-width" />
<script type="text/javascript">
var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson');
for (var word in mobileKeyWords){
if (navigator.userAgent.match(mobileKeyWords[word]) != null){
parent.window.location.href = "http://www.naver.com";
break;
}
}
</script>
</head>
<BODY>
<div align="center" style="padding:inherit; position:relative; font-size:24px">
1 2 3
</div>
</BODY>
</HTML>
**index.html 입니다.
고수님들 부탁 드립니다.
<html>
<head>
<TITLE>모조리 모바일 웹</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<meta name="viewport" content="user-scalable=auto, initial-scale=1.0, maximun-scale=1.0, minimum-scale=1.0, width= device-width" />
<script type="text/javascript">
var mobileKeyWords = new Array('iPhone', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson');
for (var word in mobileKeyWords){
if (navigator.userAgent.match(mobileKeyWords[word]) != null){
parent.window.location.href = "http://www.naver.com";
break;
}
}
</script>
</head>
<BODY>
<div align="center" style="padding:inherit; position:relative; font-size:24px">
1 2 3
</div>
</BODY>
</HTML>
**index.html 입니다.
고수님들 부탁 드립니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 3개
암튼 왜 작동안되는지 그게 궁금하다기 보다는 모바일이면 naver.com 으로 이동되는걸 원하시는거죠?
ctrl+c, v 해서 쓰시면 됩니다.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<TITLE>모조리 모바일 웹</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<meta name="viewport" content="user-scalable=auto, initial-scale=1.0, maximun-scale=1.0, minimum-scale=1.0, width= device-width" />
<script type="text/javascript">
function RedirectMobile(url){
if (url && url.length > 0 && IsMobile())
window.location = url;
}
function IsMobile(){
if (DetectUagent("android")) return true;
else if (DetectUagent("blackberry")) return true;
else if (DetectUagent("iphone")) return true;
else if (DetectUagent("opera")) return true;
else if (DetectUagent("palm")) return true;
else if (DetectUagent("windows")) return true;
else if (DetectUagent("generic")) return true;
else if (DetectUagent("ipad")) return true;
else if (DetectUagent("ipod")) return true;
return false;
}
function DetectUagent(name){
var uagent = navigator.userAgent.toLowerCase();
if (uagent.search(name) > -1)
return true;
else
return false;
}
RedirectMobile("http://naver.com");
</script>
</head>
<BODY>
<div align="center" style="padding:inherit; position:relative; font-size:24px">
1 2 3
</div>
</BODY>
</HTML>
대단히 고맙습니다. 그러나....
피씨에선 넘어가는데...
제 폰으로는 안 넘어가내요 ㅠㅠㅠㅠ
제폰은 HTC 안드로이드 버전인데..
mojori.net 입니다.
안드로이드에선 안되고요... ㅠㅠ