1. var bodyH = document.body.clientHeight
    2. var vh = document.documentElement.clientHeight
    3. console.log(vh);
    4. console.log(bodyH);
    5. // 滚动条滚动的距离+vh ==body
    6. window.onscroll = function(){
    7. var scrollTop = window.scrollY
    8. console.log(scrollTop);
    9. }
    10. // scrollTop + vh == bodyH 判断页面到底部了

    Snipaste_2021-09-29_16-20-32.jpgSnipaste_2021-09-29_16-20-56.jpg