$.ajax({
type: "POST",
async: false,
contentType: "application/x-www-form-urlencoded;charset=UTF-8",
xhrFields: {
withCredentials: true
},
url:url,
data:data,
success:function (response) {
arr = response.Data.ListData;
},
error:function (XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest.readyState);
}
});
readyState:
有可能是你success的回呼函數中報錯了。