Js gets the height of the visible area text and screen resolution of a web page

  • 2020-03-30 03:00:42
  • OfStack

Page visible region wide: document. Body. ClientWidth
High page visible area: the document. The body. ClientHeight
Page visible region wide: document. Body. OffsetWidth (including line width)
High page visible area: the document. The body. OffsetHeight (including high side)
Page of text in full width: document. Body. ScrollWidth
High page of text in full: document. Body. ScrollHeight
Web pages are scroll high: document.body.scrolltop
Page is scroll to the left: document.body.scrollleft
In the body of the page: window.screentop
Page body left: window.screenLeft
High screen resolution: window.screen.height
Width of screen resolution: window.screen.width
Screen available workspace height: window. Screen. AvailHeight
Screen available workspace width: window.screen.availwidth

I can't remember all of this so if you look around you should be able to remember it

With this I can dynamically load the image code
 
document.onmousewheel = function () { 
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; 
var hght = document.body.scrollHeight; 
if (scrollTop + document.documentElement.clientHeight >= hght) { 
 
} 

Related articles: