해상도에따라 다른페이지로 접속

· 2005-09-04 (일) 14:28:38 · 3659 · 2
<html>
<HEAD>
<TITLE> </TITLE>
<SCRIPT LANGUAGE="JavaScript">

function redirectPage() {
var url640x480 = "1.html";
var url800x600 = "2.html";
var url1024x768 = "3.html";
var url1280x1024 = "4.html";
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>
</HEAD>
<body onLoad="redirectPage()">
</body>
</html>


사용자 해상도가 640*480이면 1.html
800*600이면 2.html
1024*768이면 3.html
1280*1024이거나 이 외 해상도는 4.html 로 접속하게 됩니다.
여러가지로 응용이 되겠죠?

익스플로러&불여우에서 잘 됩니다.<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
|

댓글 2개

2005-11-02 (수) 00:36:41
^^
2006-03-20 (월) 13:59:58
index에 추가하면 좋겠네요. 꼭 활용하게 될듯... 감사합니다.^^
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
Flash 06-04-30 조회 4,967
Flash 06-04-30 조회 5,151
Flash 06-04-29 조회 4,943
Flash 06-04-29 조회 4,177
Flash 06-04-29 조회 4,393
기타 06-04-29 조회 3,404
기타 06-04-29 조회 4,005
기타 06-04-29 조회 4,157
기타 06-04-29 조회 5,124
Flash 06-04-29 조회 4,714
Flash 06-04-28 조회 3,687
Flash 06-04-28 조회 6,900
Flash 06-04-28 조회 4,361
JavaScript 06-04-28 조회 4,064
Flash 06-04-28 조회 4,932
Flash 06-04-28 조회 4,264
Flash 06-04-27 조회 5,604
Flash 06-04-27 조회 3,628
Flash 06-04-26 조회 5,861
Flash 06-04-26 조회 5,626
Flash 06-04-25 조회 7,664
Flash 06-04-25 조회 5,384
기타 06-04-25 조회 4,644
JavaScript 06-04-25 조회 4,481
JavaScript 06-04-25 조회 3,724
기타 06-04-25 조회 3,802
기타 06-04-25 조회 4,210
MySQL 06-04-25 조회 4,987
JavaScript 06-04-22 조회 4,286
Flash 06-04-20 조회 4,352