dataType: "json",
url: proxyUrl,
data: datas,
beforeSend: function () { $("#" + P_ProgressBarDivId).show(); },
complete: function () { $("#" + P_ProgressBarDivId).hide(); },
success: function (msg) {
$("#" + P_ShowDataDivId).html("");
$.each(msg.data, function (i, item) {
var reval = "";
reval += "<div class=\"bbsblock\">";
if (item.Reply_ID != null && item.Reply_ID != "") {
var PreReply="";
if(item.PreReply_ID>0)
{
var Url = SiteAppPath+"Ajax/YXAjax.ashx";
var adatas = "&jsonType=GetReplyCom&ReplyID="+item.PreReply_ID;
$.ajax({
type: "POST",
dataType: "text",
url: Url,
data: adatas,
success:function(msg){
PreReply=msg;
}});
}
reval+=PreReply;
reval+=item.Reply_Content
reval += " </div>";
$("#" + P_ShowDataDivId).append(reval);
}
});
},
error: function (xhr, ajaxOptions, thrownError) {
alert(thrownError);
return;
}
});
}
這個寫的是壹個論壇,有留言回復功能,最外壹層ajax是從後臺取出所有的留言,最裏面壹層是獲得每層所引用回復,奇怪的是最裏面壹層ajax雖然執行了,可是最後顯示並沒有顯示出來,在調試的時候,每壹層設置壹個alert(reval)又能顯示出最裏面壹層,求解這是怎麽回事兒,是緩存麽?