jQuery监听滚动条到底部

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

猜你喜欢

转载自blog.csdn.net/qq_37742572/article/details/86016521