window.onscroll = function () {
//scrollTop就是触发滚轮事件时滚轮的高度
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; //滑轮距离顶部位置
var scrollHeight = $(document).height(); //文档高度
var windowHeight = window.innerHeight; //窗口可视高度
if (scrollTop + windowHeight == scrollHeight) {
// 分页加载
getList()
}
};
来源:CSDN
作者:谁还不是块小饼干
链接:https://blog.csdn.net/qq_41654694/article/details/103710206