1var s = "";
2s += "\r\n网页可见区域宽:" + document.body.clientWidth;
3s += "\r\n网页可见区域高:" + document.body.clientHeight;
4s +=
5 "\r\n网页可见区域宽:" +
6 document.body.offsetWidth +
7 " (包括边线和滚动条的宽)";
8s += "\r\n网页可见区域高:" + document.body.offsetHeight + " (包括边线的宽)";
9s += "\r\n网页正文全文宽:" + document.body.scrollWidth;
10s += "\r\n网页正文全文高:" + document.body.scrollHeight;
11s += "\r\n网页被卷去的高:" + document.body.scrollTop;
12s += "\r\n网页被卷去的左:" + document.body.scrollLeft;
13s += "\r\n网页正文部分上:" + window.screenTop;
14s += "\r\n网页正文部分左:" + window.screenLeft;
15s += "\r\n屏幕分辨率的高:" + window.screen.height;
16s += "\r\n屏幕分辨率的宽:" + window.screen.width;
17s += "\r\n屏幕可用工作区高度:" + window.screen.availHeight;
18s += "\r\n屏幕可用工作区宽度:" + window.screen.availWidth;
19s += "\r\n你的屏幕设置是 " + window.screen.colorDepth + " 位彩色";
20s += "\r\n你的屏幕设置 " + window.screen.deviceXDPI + " 像素/英寸";
21alert(s);