window.addEventListener("scroll", function(event) {
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
console.log(scrollTop);
if(document.documentElement.scrollHeight == document.documentElement.clientHeight + scrollTop ) {
alert("到底部啦");
}
});