标签:距离 his top 长度 滚动条 UNC scroll function 判断
var nScrollHight = 0; //滚动距离总长(注意不是滚动条的长度)
var nScrollTop = 0; //滚动到的当前位置
var nDivHight = $(".scroll").height();
$(".scroll").scroll(function () {
nScrollHight = $(this)[0].scrollHeight;
nScrollTop = $(this)[0].scrollTop;
if (nScrollTop + nDivHight >= nScrollHight) {
alert("以到底!")
}
});标签:距离 his top 长度 滚动条 UNC scroll function 判断
原文地址:https://www.cnblogs.com/wugh8726254/p/13374189.html