Javascript 如何检测Youtube页面底部的滚动何时停止?
注意:在控制台中复制/粘贴代码并向下滚动页面,在控制台上查看结果 网址: 问题:如何进入页面底部? 什么是document.body.scrollHeight。请解释一下Javascript 如何检测Youtube页面底部的滚动何时停止?,javascript,google-chrome,youtube,console,Javascript,Google Chrome,Youtube,Console,注意:在控制台中复制/粘贴代码并向下滚动页面,在控制台上查看结果 网址: 问题:如何进入页面底部? 什么是document.body.scrollHeight。请解释一下 else if(newValue - oldValue < 0){ console.log("Loading, we are scrolling up! = " +
else if(newValue - oldValue < 0){
console.log("Loading, we are scrolling up! = " + newValue);
}
// Update the old value
oldValue = newValue;
}, false);
else if(newValue-oldValue<0){
log(“正在加载,我们正在向上滚动!=”+newValue);
}
//更新旧值
旧值=新值;
},假);
else if(newValue - oldValue < 0){
console.log("Loading, we are scrolling up! = " + newValue);
}
// Update the old value
oldValue = newValue;
}, false);