基于jquery鼠标或者移动端滚动加载数据
var stop = true; // 防止重复请求数据 $(window).scroll(function () { totalheight = parseInt($(window).height()) + parseInt($(window).scrollTop()); if ($(document).height() <= totalheight) { if (stop == true) { stop = false; $.post("loadContent1.html", function (data) { stop = true; }, "html"); } } });