The visible area width of the web page: document.body.clientWidth
The visible area height of the web page: document.body.clientHeight
The visible area width of the web page: document.body.offsetWidth (including the width of the edge line)
The visible area height of the web page: document.body.offsetHeight (including the height of the edge line)
Full text width of the web page: document.body.scrollWidth
Full text of the web page: document.body.scrollHeight
The web page is rolled out at a high level: document.body.scrollTop
The left of the web page being rolled out: document.body.scrollLeft
On the main part of the web page: window.screenTop
Left of the main text of the web page: 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
Because I can't remember these things, I can remember them if I turn them around and read them frequently.
With this, I can dynamically load the image code
The code copy is as follows:
document.onmousewheel = function () {
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var hght = document.body.scrollHeight;
if (scrollTop + document.documentElement.clientHeight >= hght) {
/*Write the code to load the picture here*/
}