Web page visible region wide: document. Body. High clientWidth page visible area: document. Body. ClientHeight page visible region wide: document. The body. The offsetWidth (including line width) high page visible area: Document. Body. OffsetHeight (including line width) page of text in full width: the document. The body. The high scrollWidth web page text full text: the document. The body. The high scrollHeight web swept to: ScreenLeft: window.screenLeft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft Window. The screen. The height of screen resolution: wide window. The screen. The available workspace height: width screen. The window screen. AvailHeight screen available workspace width: Window.screen. availWidth Gets the window width: window.innerWidth Gets the window height: Window. The innerHeight HTML precise positioning: scrollLeft, scrollWidth, clientWidth, offsetWidth scrollHeight: get rolling height of objects. ScrollLeft: sets or gets the distance between the left edge of the object and the leftmost part of the currently visible content in the window scrollTop: sets or gets the distance between the top part of the object and the top part of the currently visible content in the window scrollWidth: gets the scrollWidth of the object OffsetHeight: Gets the height of the object relative to the layout or the parent coordinate specified by the parent coordinate offsetLeft: Gets the computed left position of the object relative to the layout or the parent coordinate specified by the offsetParent attribute OffsetTop: Gets the top calculated position of the object relative to the layout or parent specified by the offsetTop property Event. The vertical coordinate document offsetY relative container. DocumentElement. The scrollTop value of the vertical scroll event. ClientX + document. The documentElement. ScrollTop The amount of horizontal + vertical scrolling relative to the document is as follows: IE6.0, FF1.06+ :  clientWidth = width + padding clientHeight = height + padding offsetWidth = width + padding + border offsetHeight = Height + padding + border IE5.0/5.5: ClientWidth = width - border clientHeight = height - border offsetWidth = width offsetHeight = height Margin in the CSS properties, has nothing to do with clientWidth, offsetWidth and clientHeight, offsetHeight) page visible region wide: document. The body. The high clientWidth page visible area: Document. Body. ClientHeight page visible region wide: the document. The body. The offsetWidth high viewing area (including line width) page: Document. Body. OffsetHeight (including high edges) page of text in full width: the document. The body. The high scrollWidth web page text full text: the document. The body. The high scrollHeight web swept to: ScreenLeft: window.screenLeft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft: window.screenleft Window. The screen. The height of screen resolution: wide window. The screen. The available workspace height: width screen. The window screen. AvailHeight screen available workspace width: Window.screen. availWidth ------------------- Technical essentials This section of the code mainly uses the Document object about some properties of the window, the main functions and uses of these properties are as follows. To get the size of the Window, you need to use different properties and methods for different browsers: To detect the true size of the Window, under Netscape you need to use the Window property; In IE, you need to go deep inside the Document to detect the body; In the DOM context, to get the size of the window, you need to look at the size of the root element, not the element. The innerWidth property of the Window object contains the innerWidth of the current Window. The innerHeight property of the Window object contains the internal height of the current Window. The body property of the Document object corresponds to the tag of the HTML Document. The documentElement property of the Document object represents the root node of the HTML Document. Document. Body. ClientHeight said HTML document in the current height of the window. Document.body. clientWidth represents the current width of the window in which the HTML document is located. The implementation code<! DOCTYPEhtml PUBLIC "- / / / / W3C DTD XHTML 1.0 Transitional / / EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Please adjust the browser window</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<body>
<h2 align="center">Please resize your browser window</h2><hr>
<form action="#" method="get" name="form1" id="form1">
<! Display the actual size of the browser window -->The actual height of the browser window:<input type="text" name="availHeight" size="4"><br>The actual width of the browser window:<input type="text" name="availWidth" size="4"><br>
</form>
<script type="text/javascript"><! --var winWidth = 0;
var winHeight = 0;
function findDimensions(// Function: get the size{
// Get the window width
if (window.innerWidth)
winWidth = window.innerWidth;
else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;
// Get window height
if (window.innerHeight)
winHeight = window.innerHeight;
else if ((document.body) && (document.body.clientHeight))
winHeight = document.body.clientHeight;
// Get the window size by checking the body inside the Document
if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth)
{
winHeight = document.documentElement.clientHeight;
winWidth = document.documentElement.clientWidth;
}
// The result is output to two text boxes
document.form1.availHeight.value= winHeight;
document.form1.availWidth.value= winWidth;
}
findDimensions();
// Call the function to get the value
window.onresize=findDimensions;
//-->
</script>
</body>
</html> 
Copy the code

Welcome to qq group communication: 704028989