您的位置:首页 > Web前端 > JavaScript

关于:javascript检测屏幕分辨率

2006-06-02 12:45 381 查看
<script language="JavaScript">
<!-- Begin
function redirectPage() {
if ((screen.width == 640) && (screen.height == 480))
size = "640 x 480";
else if ((screen.width == 800) && (screen.height == 600))
size = "800 x 600";
else if ((screen.width == 1024) && (screen.height == 768))
size = "1024 x 768";
else size = "the default 640 x 480";
alert("经系统检测,你的屏幕分辨率为 " + size + ",你的显示器适于....");
}
// End -->
</script>

……
文章来源:http://wangzhq.blog.com.cn/archives/2006/894776.shtml
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: