jquery ajax用post 方法在ie中接收页面不能接收到传值
asyncbox.confirm('删除后不可恢复!确定要删除?', '提示', function (action) {
//confirm 返回三个 action 值,分别是 'ok'、'cancel' 和 'close'。
if (action == 'ok') {
$.post('../Handler/delHandler.ashx', {"id":dcid,"type":"collection"}, function (data, status) {
var json = eval("(" + data + ")");
if (json.status == "y") {
parent.asyncbox.success(json.info, "提示", function (action) {
window.location.reload();
});
} else {
parent.asyncbox.error(json.info, "错误");
}
});
}
});
context.Response.ContentType = "text/plain";
int id = Convert.ToInt32(context.Request.Form["id"]);
string type = Convert.ToString(context.Request.Form["type"]);
string result ="{"status":"n","info":"未知错误!"}";
switch (type)
{
case "activity":
result=deleteActivity(id);
break;
case "admin":
result = deleteAdmin(id);
break;
case "discuss":
result = deleteDiscuss(id);
break;
case "collection":
result = deleteCollection(id);
break;
case "experience":
result = deleteExperience(id);
break;
case "process":
result = deleteProcess(id);
break;
case "reply":
result = deleteReply(id);
break;
case "result":
result = deleteResult(id);
break;
case "topic":
result = deleteTopic(id);
break;
default:
break;
}
context.Response.Write(result);