在asp中如何得到网页的宽?

来源:百度知道 编辑:UC知道 时间:2024/05/23 18:07:10
dim MyWidth
...
...
MyWidth=当前的document.body.clientWidth这句怎么写?

if MyWidth<1024 then
MyWidth=775
end if
...
...

用screen对象获得显示器的分辨率,

<script language=vbscript>

if screen.width<1024 then

alert("屏幕分辨率过小")

end if

</script>

----

获得网页的宽度和高度,

用posWidth和posHeight属性即可,

ASP是服务端脚本啊,没办法控制客户端浏览器的显示。