document.querySelector('.content').addEventListener('scroll',function () {
        //读取内容区域的真实高度(滚动条高)
//        console.log(this.scrollHeight);
        //读取滚动条的位置
//        console.log(this.scrollTop);
        //设置滚动到的位置
//            this.scrollTop=800;
        //读取元素的高度
//        console.log(this.clientHeight)
        //意思就是内容总体的高度 - 滚动条的偏移值  === 元素的高度(包含内边)但不包含外边距,边框,以及滚动条
        if(this.scrollHeight-this.scrollTop===this.clientHeight){
            console.log("到达底部");
        }
    })

  【转载】,刘备用,地址:http://blog.csdn.net/jayhkw/article/details/53760478

  

相关文章:

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