var scrollTop; //获取滚动条到顶部的距离
var scrollHeight; //获取文档区域高度
var windowHeight; //获取滚动条的高度
var flag = true; //加载数据标志
$(window).scroll(function(){
scrollTop = $(this).scrollTop();
scrollHeight = $(document).height();
windowHeight = $(this).height();
if(scrollTop + windowHeight == scrollHeight && flag == true ){
test();
}
});
var scrollHeight; //获取文档区域高度
var windowHeight; //获取滚动条的高度
var flag = true; //加载数据标志
$(window).scroll(function(){
scrollTop = $(this).scrollTop();
scrollHeight = $(document).height();
windowHeight = $(this).height();
if(scrollTop + windowHeight == scrollHeight && flag == true ){
test();
}
});