87,910
社区成员
发帖
与我相关
我的任务
分享
var pageIndex = 2;
var stop = true;
if (allstop == true) {
$(window).scroll(function () {
totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
if ($(document).height()-240 <= totalheight+250) {
if (stop == true) {
stop = false;
$.post("/ajax/casesList.aspx", { "pageIndex": pageIndex, "category_id": category_id }, function (txt) {
if (txt != '') {
$("#Loading").before(txt);
pageIndex++;
stop = true;
}
else {
$("#Loading").css('background', 'url("/templates/zhuojie/images/bottom.png") no-repeat center');
stop = false;
}
}, "text");
}
}
});
}
从中我们看到$.post("/ajax/casesList.aspx", { "pageIndex": pageIndex, "category_id": category_id }, function (txt)
里面的$.post的身影。
那么用它来认证一下你所说的,其中/ajax/casesList.aspx就相当于那个php文件
但当打开它后即是一个静态页面http://www.zhuojie.cc//ajax/casesList.aspx,不知这个如何理解?[/quote]你看数据返回的什么啊,var pageIndex = 2;
var stop = true;
if (allstop == true) {
$(window).scroll(function () {
totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
if ($(document).height()-240 <= totalheight+250) {
if (stop == true) {
stop = false;
$.post("/ajax/casesList.aspx", { "pageIndex": pageIndex, "category_id": category_id }, function (txt) {
if (txt != '') {
$("#Loading").before(txt);
pageIndex++;
stop = true;
}
else {
$("#Loading").css('background', 'url("/templates/zhuojie/images/bottom.png") no-repeat center');
stop = false;
}
}, "text");
}
}
});
}
从中我们看到$.post("/ajax/casesList.aspx", { "pageIndex": pageIndex, "category_id": category_id }, function (txt)
里面的$.post的身影。
那么用它来认证一下你所说的,其中/ajax/casesList.aspx就相当于那个php文件
但当打开它后即是一个静态页面http://www.zhuojie.cc//ajax/casesList.aspx,不知这个如何理解?