📅  最后修改于: 2022-03-11 15:03:17.334000             🧑  作者: Mango
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');
}
};