scrollend,滚动结束执行一次

var timer;
window.onscroll = function () {
clearTimeout(timer);
timer = setTimeout(function () {
alert(1)
}, 100)
}
原文地址:https://www.cnblogs.com/hello321/p/7851981.html