我正在通过ajax获取一些要在页面上显示的字符串并继续获取错误结果:
$.ajax({
url : '/myurl',
data : post_param,
dataType : 'json',
type : 'POST',
success : function(data) {
//show data on the page
}
error : function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.text);
console.log(textStatus);
console.log(errorThrown);
}
});
在控制台日志中,
XMLHttpRequest.text:undefined,
textStatus:错误,
errorThrown:,(我认为只是一个空字符串)
JQuery:1.8.2
Android:2.3
顺便说一句,ajax请求是通过自签名SSL发送的,POST参数中有Unicode特征可能会导致问题。
任何建议都将受到赞赏。