📌  相关文章
📜  滚动值底部 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:17.334000             🧑  作者: Mango

代码示例2
window.onscroll = function() {
    let d = document.documentElement;
    let offset = d.scrollTop + window.innerHeight;
    let height = d.offsetHeight;

    console.log('offset = ' + offset);
    console.log('height = ' + height);

    if (offset >= height) {
        console.log('At the bottom');
    }
};