[求助]怎样判断用户的屏幕分辨率是800*600还是1024*768?

itzhiren 2005-01-03 03:48:48
[求助]怎样判断用户的屏幕分辨率是800*600还是1024*768?
...全文
146 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lienzhu 2005-01-03
  • 打赏
  • 举报
回复
<script language="vbscript">
w=window.screen.width
h=window.screen.height
msgbox "分辨率为:" & w & "*" & h
</script>
itzhiren 2005-01-03
  • 打赏
  • 举报
回复
用vbscript怎么写呢?
itzhiren 2005-01-03
  • 打赏
  • 举报
回复
必须用js写吗
dsclub 2005-01-03
  • 打赏
  • 举报
回复
screen.width
screen.height
lienzhu 2005-01-03
  • 打赏
  • 举报
回复
服务器端

<%
dim width,height
width=request("sw")
height=request("sh")
if width="" or height="" then
%>
<script language="javascript">
location=location.href+"?sw="+screen.width +"&sh="+screen.height
</script>
<%
response.end
end if
response.write "分辨率为:" & width & "*" & height
%>
Aimar168 2005-01-03
  • 打赏
  • 举报
回复
if (window.screen.width==1024){
alert('1024*768');
}
if (window.screen.width==800){
alert('800*600');
}

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧