Sometimes we need to get the size of the window to fit the different display on different screens, the event that triggers when the screen is changed
$ (window). Resize (function () {
The code you want to execute
});
document.write ($ (window). Height ()); The window's visible area is document.write ($ (document)). Height ()); The height of the window document in the browser nowadays
document.write ($ (document.body). Height ());//browser Current window document body level
document.write ($ (document.body). Outerheight (True))//Browser The total height of the body of the window document currently includes border padding margin
document.write ($ (window). width ()); Window viewable area width in browser
document.write ($ (document). width ());//browser Current window document for image widths
document.write ($ (document.body). width ());//browser Current window document body height
document.write ($ (document.body). Outerwidth (True))//Browser The total width of the body of the window document currently includes border padding margin
document.write ($ (document). ScrollTop ()); Gets the vertical height of the scroll bar to the top
document.write ($ (document). ScrollLeft ()); Gets the vertical width of the scroll bar to the left
$ (document) when the document is in a window with a height of less than the browser window. Height () returns $ (window). Height ().
$ ("body"). Height () If the body has no border, margin, $ ("body"). Height () ==$ (document). Height (), However, it is not recommended that you use this approach to get the document content height