$(document).ready(function() { var flag = false; $("#scroll_div").scroll(function(){ if(flag){ //数据加载中 return false; } var divHeight = $(this).height(); var nScrollHeight = $(this)[0].scrollHeight; var nScrollTop = $(this)[0].scrollTop; $("#input1").val(nScrollHeight); $("#input2").val(nScrollTop); $("#input3").val(divHeight); if(nScrollTop + divHeight >= nScrollHeight) { //请求数据 flag = true; alert("到达底部了"); } }); });