document.addEventListener('touchmove', function() {
            let scrollTopH = document.body.scrollTop || document.documentElement.scrollTop;
            var clientHeight = document.documentElement.scrollTop === 0 ? document.body.clientHeight : document.documentElement.clientHeight;
            var scrollTop = document.documentElement.scrollTop === 0 ? document.body.scrollTop : document.documentElement.scrollTop;
            var scrollHeight = document.documentElement.scrollTop === 0 ? document.body.scrollHeight : document.documentElement.scrollHeight;
            if (scrollTop != 0 && clientHeight + scrollTop == scrollHeight) {
                console.log('‘到达底部’')
            }
        })

弱鸡的前端程序员
33 声望3 粉丝