显示后台操作进度 .netc#实时显示进度显示asp.net 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ajax访问一个页面,由那个页面返回对应设备返回的信息 *****************************************************************************签名档: http://feiyun0112.cnblogs.com/ 我是有这么做 strdisplay: function () { $.ajax({ type: "post", dataType: "JSON", url: "AjaxMonitor.aspx", data: $("form:eq(0)").serialize() + "&v=" + Math.random(), success: function (data) { alert(data.display); art.dialog.tips(data.display); $("#txtrich").val($("#txtrich").val() + data.display); // $("#txtrich").val( $("#txtrich").val()+data.display); if (data.displayFlag == "0") { setTimeout(function () { funs.strdisplay(); }, 2000); } else { art.dialog.tips("修改结束..."); $("#txtrich").val($("#txtrich").val() + "修改结束..."); } } }); }, update: function () { if (funs.getIds() == "") { art.dialog.tips("请选择记录进行修改!"); return false; } $("#txtrich").html("开始修改!\r\n"); funs.strdisplay(); funs.updateFunction(funs.getIds()); }, updateFunction: function (ids) { $.ajax({ type: "post", dataType: "JSON", url: "WebBSCpwd.aspx", data: $("form:eq(0)").serialize() + "&type=update&method=ajax&id=" + ids + "&v=" + Math.random(), success: function (data) { if (data.state == "1") { art.dialog.tips("修改完成!"); } else { art.dialog.tips("修改失败!"); } } }); return false; },获取设备返回的信息放在Session中 Response.Clear(); Response.Write(string.Format(@"{{""displayFlag"":""{0}"",""display"":""{1}""}}", Session["displayFlag"], Session["display"])); Response.End();但是前台没有显示返回值 上面有循环调用 setTimeout(function () { funs.strdisplay(); }, 2000); 那你就调试看ajax的返回对不对 strdisplay: function () { $.ajax({ type: "post", dataType: "JSON", url: "AjaxMonitor.aspx", data: $("form:eq(0)").serialize() + "&v=" + Math.random(), success: function (data) { alert(data.display); art.dialog.tips(data.display); $("#txtrich").val($("#txtrich").val() + data.display); // $("#txtrich").val( $("#txtrich").val()+data.display); if (data.displayFlag == "0") { setTimeout(function () { funs.strdisplay(); }, 2000); } else { art.dialog.tips("修改结束..."); $("#txtrich").val($("#txtrich").val() + "修改结束..."); } } }); },上一个红色的执行了就下一个红色的了,中间的没执行,但是在全部执行结束后有能弹框执行红色中间的代码 我后来把 EnableSessionState="true" 修改为 EnableSessionState="ReadOnly"就可以了,不过不是很明白为什么,另外我的页面嵌套了母版 执行$("#txtrich").html("开始修改!\r\n");页面不显示文字,但是去掉母板,页面就能显示开始修改的文字,有人知道为什么吗 上代码,关于一个form中打开另一个form的问题 C# 控制MessageBox的长度 高手进来下 2005下事件删除 急!!请高手帮我看看这个程序有什么问题啊!! documents.open如何操作服务器端的文档 在线等急 VC#2005 EXPress 中如何设置括号自动匹配? wcf rest post服务端无法接收数据 这两天去找工作,操,郁闷.......散分 请大家一起来讨论:“给你学习c#一个理由先!!??!!" CS Listview用法求助 C#如何模拟真实的键盘输入?
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
strdisplay: function () { $.ajax({
type: "post",
dataType: "JSON",
url: "AjaxMonitor.aspx",
data: $("form:eq(0)").serialize() + "&v=" + Math.random(),
success: function (data) {
alert(data.display);
art.dialog.tips(data.display);
$("#txtrich").val($("#txtrich").val() + data.display);
// $("#txtrich").val( $("#txtrich").val()+data.display);
if (data.displayFlag == "0") {
setTimeout(function () { funs.strdisplay(); }, 2000);
} else {
art.dialog.tips("修改结束...");
$("#txtrich").val($("#txtrich").val() + "修改结束...");
}
}
}); },
update: function () {
if (funs.getIds() == "") {
art.dialog.tips("请选择记录进行修改!"); return false;
}
$("#txtrich").html("开始修改!\r\n");
funs.strdisplay();
funs.updateFunction(funs.getIds());
},
updateFunction: function (ids) {
$.ajax({
type: "post",
dataType: "JSON",
url: "WebBSCpwd.aspx",
data: $("form:eq(0)").serialize() + "&type=update&method=ajax&id=" + ids + "&v=" + Math.random(),
success: function (data) {
if (data.state == "1") {
art.dialog.tips("修改完成!");
} else { art.dialog.tips("修改失败!");
}
}
});
return false; },
获取设备返回的信息放在Session中
Response.Clear();
Response.Write(string.Format(@"{{""displayFlag"":""{0}"",""display"":""{1}""}}", Session["displayFlag"], Session["display"]));
Response.End();
但是前台没有显示返回值
上面有循环调用
setTimeout(function () { funs.strdisplay(); }, 2000);
strdisplay: function () { $.ajax({
type: "post",
dataType: "JSON",
url: "AjaxMonitor.aspx",
data: $("form:eq(0)").serialize() + "&v=" + Math.random(),
success: function (data) { alert(data.display);
art.dialog.tips(data.display);
$("#txtrich").val($("#txtrich").val() + data.display);
// $("#txtrich").val( $("#txtrich").val()+data.display);
if (data.displayFlag == "0") {
setTimeout(function () { funs.strdisplay(); }, 2000);
} else {
art.dialog.tips("修改结束...");
$("#txtrich").val($("#txtrich").val() + "修改结束...");
}
} }); },上一个红色的执行了就下一个红色的了,中间的没执行,但是在全部执行结束后有能弹框执行红色中间的代码