웹마스터 팁

<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>


이렇게 하면 해상도에 따라서 다른 페이지를 보여줍니다.

해상도가 무지 신경쓰였을때는 홈페이지를 이런식으로 따로 만들었던 적도 있었습니다..

쓸모가 있을지는 모르겠습니다만

재밌는 소스랍니다 _-_ㅎㅎ

index에 살짝 넣어주면 알아서 해상도를 체크하고 홈페이지가 뜬답니다..

방문자는 알아채지 못함~~