经过本人查阅无数资料,最终得出一个比较简单,具有一定兼容性的结果。
$(window).scroll(function( ) {
var scrolltop = document.documentelement.scrolltop || window.pageyoffset || document.body.scrolltop;
var scrollheight = document.body.scrollheight;
var windowheight = document.body.clientheight;
if(scrolltop + windowheight == scrollheight) {
// alert("已经到最底部了”);
}
});