netshuai

导航

实现800*600,1024*768两套分辨率方案

下面这段代码,可以实现800*600,1024*768两套分辨率方案。

<html>
<head>
<title>Untitled Document</title>
<script language="javascript">
function go(){
var myWidth=screen.width
if (myWidth>800){
window.location.replace("1024.htm")
}
else{
window.location.replace("800.htm")
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body onLoad="go()" topmargin="0" leftmargin="0">
</body>
</html>

posted on 2007-10-18 23:00  netshuai  阅读(677)  评论(0编辑  收藏  举报