我做一个异步Ajax调用服务器,但错误回调从服务器获得响应之前打(我可以使用招就见):jQuery的AJAX命中错误回调从服务器获取响应之前 - IE11
$.ajax({
url: 'Login.aspx/AuthenticateRegularUser',
type: 'POST',
contentType: 'application/json; charset=utf-8',
async: true,
dataType: "json",
data: '{ "emailAddress": "' + emailAddress + '","password": "' + password + '","verificationCode": "' + verificationCode + '" }',
success: function(Result) {
if (Result != "") {
var ClientResponse = JSON.parse(Result.d);
if (ClientResponse.Success) {
//DO SUCCESS
}
else {
//DO FAIL
}
}
},
error: function(xhr, textStatus, errorThrown) {
//DO ERROR
}
});
它只发生在使用IE11时。
有什么想法为什么?
2013-12-11
Inbal
+0
错误回调块中提供的任何有用信息? –
+0
对于初学者,使用一个对象作为'data',而不是自制的JSON字符串:'data:{emailAddress:emailAddress,password:password,verificationCode:verificationCode}'。另外,什么是'errorThrown'值,以及textStatus是什么样的? –
+0
感谢您的回复家伙! @ user2310289 - 我收到一个空的错误。没有textstatus和没有响应文本,null errorThrown。这是真正的问题:) –