1

我正在通过 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 : error,
errorThrown : , (我认为只是一个空字符串)

JQuery : 1.8.2
Android : 2.3
顺便说一句,ajax 请求是通过自签名 SSL 发送的,POST 参数中有 Unicode 字符可能会导致问题。

任何建议将不胜感激。

4

0 回答 0