$.ajax({
type: "GET",
url: url,
dataType: "json",
async: false,
success: function(json, textStatus){
//doing
},
error: function (xhr, err) {
alert("readyState: " + xhr.readyState + "\nstatus: " + xhr.status);
alert("responseText: " + xhr.responseText);
}
});
原文:http://www.cnblogs.com/zhuiluoyu/p/4685434.html