JS判断滚动条是否已经滚动到底部
$(function () {
window.onscroll = function () {
var clientHeight = document.documentElement.scrollTop == 0 ? document.body.clientHeight : document.documentElement.clientHeight;
var scrollTop = document.documentElement.scrollTop == 0 ? document.body.scrollTop : document.documentElement.scrollTop;
var scrollHeight = document.documentElement.scrollTop == 0 ? document.body.scrollHeight : document.documentElement.scrollHeight;
if (clientHeight + scrollTop == scrollHeight) {
//滚动到底部后需要做的事情
}
}
})