$(“#btnLogin”)。click(function(){
if (order != "undefined")
$.ajax(
{
type: "POST",
data: "{'NewOrder': '" + order + "'}",
url: "imgpost.aspx/Update",
dataType: "json",
contentType: "application/json",
processdata: true,
beforeSend: function (xhr, data) {
console.log(data);
alert(data);
},
success: function (msg) {
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("Error Occured!" + " | " + XMLHttpRequest + " | " + textStatus + " | " + errorThrown);
}
});
});
此处ajax调用失败,未重定向到url:“imgpost.aspx / Update”。
XMLHttpRequest和textStatus分别显示未定义和错误。
仅在mozilla 18.0.1的最新更新中出现
任何人都可以帮助我。
答案 0 :(得分:0)
删除对象周围的引号。
data: {NewOrder: order},