按屏幕分辨率进入页面

发布时间:2007年01月24日      浏览次数:1346 次
<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
免责声明:本站相关技术文章信息部分来自网络,目的主要是传播更多信息,如果您认为本站的某些信息侵犯了您的版权,请与我们联系,我们会即时妥善的处理,谢谢合作!