window.onscroll = function () { var winScroll = document.documentElement.scrollTop || document.body.scrollTop; if (winScroll == (document.body.offsetHeight - document.documentElement.clientHeight)) { alter("触发事件了"); } }