上拉加载触底事件最简单写法

window.addEventListener('scroll', this.handleScroll);

    function handleScroll() {
        //判断滚动到底部
        if ($(window).scrollTop() >=$(document).height() - $(window).height()) {
            console.log(132456)
        }
    }
原文地址:https://www.cnblogs.com/Basu/p/9149457.html