scrollend,滚动结束执行一次

var timer;
window.onscroll = function () {
clearTimeout(timer);
timer = setTimeout(function () {
alert(1)
}, 100)
}

 

posted @ 2017-11-17 15:47  对三  阅读(2434)  评论(0编辑  收藏  举报