scrollend,滚动结束执行一次 var timer;window.onscroll = function () { clearTimeout(timer); timer = setTimeout(function () { alert(1) }, 100)}