1 2 3 4 5 6 7 8 9 10 11 |
$(document).scroll(function() { let showHight = getScrollTop(); let scrollTop = getClientHeight(); console.log('当前可视区域的高度:=>'+showHight); console.info('滚动条距离顶部高度:=>'+scrollTop); console.log('整个文档的高度:=>'+getScrollHeight()); if (getScrollTop() + getClientHeight() >= getScrollHeight()) { console.log('到了~~'); console.log('插入20个li'); } }); |
[生病] 看不到代码