$(window).scroll(function(){
                var scrollTop = $(this).scrollTop();  //scrollTop() 方法返回或设置匹配元素的滚动条的垂直位置
                var scrollHeight = $(document).height(); //整个文档的高度
                var windowHeight = $(this).height(); //当前可见区域的大小
                if(scrollTop + windowHeight == scrollHeight){
                    alert('The page has been scrolled to the bottom')
                }
            })

 当 html,body{width:100%;height:100%;}  绑定在window或者body无法触发onscroll和scroll  即jq和js都不会触发scroll事件!

相关文章:

  • 2021-06-23
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案