前往顾页
以后地位: 主页 > 收集编程 > Jsp实例教程 >

js获得注释和屏幕高度示例代码

时候:2010-11-03 00:44来源:知行网www.zhixing123.cn 编辑:麦田守望者

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
var s = "";
s += "\r\n网页可见地区宽:"+ document.body.clientWidth;
s += "\r\n网页可见地区高:"+ document.body.clientHeight;
s += "\r\n网页可见地区高:"+ document.body.offsetWeight +" (包含边线的宽)";
s += "\r\n网页可见地区高:"+ document.body.offsetHeight +" (包含边线的宽)";
s += "\r\n网页注释全文宽:"+ document.body.scrollWidth;
s += "\r\n网页注释全文高:"+ document.body.scrollHeight;
s += "\r\n网页被卷去的高:"+ document.body.scrollTop;
s += "\r\n网页被卷去的左:"+ document.body.scrollLeft;
s += "\r\n网页注释部分上:"+ window.screenTop;
s += "\r\n网页注释部分左:"+ window.screenLeft;
s += "\r\n屏幕辩白率的高:"+ window.screen.height;
s += "\r\n屏幕辩白率的宽:"+ window.screen.width;
s += "\r\n屏幕可用事情区高度:"+ window.screen.availHeight;
s += "\r\n屏幕可用事情区宽度:"+ window.screen.availWidth;
alert(s);
</SCRIPT>
</body>
</html>

------分开线----------------------------
标签(Tag):Javascript javascript教程 javascript殊效 javascript源码 javascript实例
------分开线----------------------------
保举内容
猜你感兴趣