<html>
<head>
<title>中国站长天空-网页特效-导航菜单-按屏幕分辨率进入页面</title>
<meta http-equiv="content-Type" content="text/html;charset=gb2312">
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<script LANGUAGE="JavaScript">
<!-- Begin
function redirectPage() {
var url640x480 = "http://www.163.com";
var url800x600 = "http://www.zzsky.cn";
var url1024x768 = "http://www.zzsky.cn";
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= url640x480;
}
// End -->
</script>
<form>
<input type=button value="进入符合分辨率的页面" onClick="redirectPage()">
</form>
</body>
</html>
<head>
<title>中国站长天空-网页特效-导航菜单-按屏幕分辨率进入页面</title>
<meta http-equiv="content-Type" content="text/html;charset=gb2312">
</head>
<body>
<!--把下面代码加到<body>与</body>之间-->
<script LANGUAGE="JavaScript">
<!-- Begin
function redirectPage() {
var url640x480 = "http://www.163.com";
var url800x600 = "http://www.zzsky.cn";
var url1024x768 = "http://www.zzsky.cn";
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= url640x480;
}
// End -->
</script>
<form>
<input type=button value="进入符合分辨率的页面" onClick="redirectPage()">
</form>
</body>
</html>
文章来源:http://www.zzsky.cn/effect/content/619.htm