Javascript:
Visible area width of the webpage: document. body. clientWidth
Visible area height: document. body. clientHeight
Visible area width of the webpage: document. body. offsetWidth (including the width of the edge)
Visible area height of the webpage: document. body. offsetHeight (including the height of the edge)
Webpage text width: document. body. scrollWidth
Webpage text height: document. body. scrollHeight
The height of the page to be rolled: document. body. scrollTop
Left: document. body. scrollLeft
Page body: window. screenTop
Page body part left: window. screenLeft
Screen Resolution height: window. screen. height
Screen Resolution width: window. screen. width
Available screen workspace Height: window. screen. availHeight
Available workspace width: window. screen. availWidth
JQuery:
Copy codeThe Code is as follows:
$ (Document). ready (function (){
Alert ($ (window). height (); // The visible area height of the current window in the browser
Alert ($ (document). height (); // The height of the current window document in the browser
Alert ($ (document. body). height (); // The height of the current file body in the browser window
Alert ($ (document. body). outerHeight (true); // the total height of the current file body in the browser window includes border padding margin.
Alert ($ (window). width (); // The width of the visible area of the current window in the browser
Alert ($ (document). width (); // width of the document Object in the current window of the browser
Alert ($ (document. body). width (); // The width of the document body in the current window of the browser
Alert ($ (document. body). outerWidth (true); // The total width of the current file body in the browser window includes border padding margin
})