<script>
function A () {
document.write (
"Screen resolution is:" +screen.width+ "*" +screen.height
+ "<br/>" +
"Screen Available size:" +screen.availwidth+ "*" +screen.availheight
+ "<br/>" +
"width of page visible area:" +document.body.clientwidth
+ "<br/>" +
"Page visible Area High:" +document.body.clientheight
+ "<br/>" +
"width of the visible area of the page (including the width of the edge):" +document.body.offsetwidth
+ "<br/>" +
"The visible area of the page is high (including the width of the edge):" +document.body.offsetheight
+ "<br/>" +
"Page body Full text width:" +document.body.scrollwidth
+ "<br/>" +
"Page body Full text High:" +document.body.scrollheight
+ "<br/>" +
"The page was rolled High:" +document.body.scrolltop
+ "<br/>" +
"The webpage was rolled away left:" +document.body.scrollleft
+ "<br/>" +
"On the body part of the webpage:" +window.screentop
+ "<br/>" +
"Page body part left:" +window.screenleft
+ "<br/>" +
"High screen resolution:" +window.screen.height
+ "<br/>" +
"Width of screen resolution:" +window.screen.width
+ "<br/>" +
"Screen usable workspace height:" +window.screen.availheight
+ "<br/>" +
Screen available work area width: +window.screen.availwidth
);
}
</script>
<body onload= "A ()" >
</body>
Original address: http://www.cnblogs.com/lf6112/archive/2011/07/26/2117348.html
JavaScript Gets the screen size