Scrolling load
function Scroll_load () {
var Scrollbottom; page body Full text high -height of scroll bar distance from top
$ (document). Scroll (function () {//Scroll event
Scrollbottom = Document.body.scrollheight-document.body.scrolltop;
if (Scrollbottom = = document.body.clientheight| | Scrollbottom <= (document.body.clientheight+10)) {
Scrollbottom is equal to the high visibility area of the page, and if it is equal, execute the following code
if (PageCount = = (currentpage+1)) {//Determines whether the total number of pages equals the current page +1, and if equal executes the following code
$ (". Click-load"). Hide ();
Return
}
currentpage++;//current page number plus 1
Showlist (currentpage,pagesize); Paging interface of the server accessed, requesting data
}
});
}
By the way, write the usual height:
Javascript:
alert (document.body.clientWidth); Web page visible area width (body)
alert (document.body.clientHeight); Web page Visible Area high (body)
alert (document.body.offsetWidth); Web page visible area width (body), including border, margin, etc.
alert (document.body.offsetHeight); Web page visible area width (body), including border, margin, etc.
alert (document.body.scrollWidth); Page body full text width, including non-visible area with scroll bar
alert (document.body.scrollHeight); The full text of the Web page is high, including the unseen area with scroll bars
alert (DOCUMENT.BODY.SCROLLTOP); Top (scroll bar) of the page being rolled away
alert (document.body.scrollLeft); Web page is rolled away left (scroll bar)
alert (window.screentop); Browser Distance Top
alert (window.screenleft); Browser distance left
alert (window.screen.height); High screen resolution
alert (window.screen.width); Width of screen resolution
alert (window.screen.availHeight); The screen can be high on the work area
alert (window.screen.availWidth); the width of the work area available on the screen
Jquery
Alert ($ (window). Height ()); Browser Current window viewable area height
Alert (document). Height ()); The height of the browser's current window document
Alert ($ (document.body). Height ()); The height of the body of the browser's current window document
Alert ($ (document.body). Outerheight (true)); Browser Current Window document body total height includes border padding margin
Alert ($ (window). width ()); Browser Current window viewable area width
Alert (document). width ()); Browser Current Window Document object width
Alert ($ (document.body). width ()); Browser Current Window document body width
Alert ($ (document.body). Outerwidth (true)); Browser Current Window document body total width includes border padding margin
Mobile-side page swipe to the bottom to load information