JS判断是否已经到达页面底部

$(window).scroll(function(){
var scrollTop=$(this).scrollTop();
var scrollHeight=$(document).height();
var windowHeight=$(this).height();
if(scrollTop+windowHeight==scrollHeight){
alert("到底了!");
}

});

  

原文地址:https://www.cnblogs.com/xiaolinxi/p/5133133.html