HTML,CSS,JS

사용자의 해상도에 맞는 사이트를 띄우기

수퍼곰탱이 2007. 5. 9. 23:20

<script language="javascript">
<!--
var swidth=1024;
var sheight=768;
if (screen.width<swidth||screen.height<sheight){location.replace("low.htm");}
else{location.replace("high.htm");}
//-->
</script>

사용자의 해상도를 알아내어 해당 해상도에 맞는 페이지를 보여준다.
단, 각 해상도에 맞는 사이트를 따로 제작해야한다.