用 ajax 发请求时,错误信息中 readyState 和 status 都正常, 而 statusText 是 "load",请问一下这是什么错误。我在网上找的大家都是 statusText:"success" 错误
handleClick() {
$.ajax({
url:'http://*****/user.json',
type: 'get',
dataType: 'jsonp',
success: function(data){
console.log(data);
this.state.data = data;
},
error:function(err){
console.log(err);
}
})
}
response 中也拿到了 json 数据:

这是打印的信息

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
把你的ajax代码贴出来看一下什么原因
http://stackoverflow.com/ques...
That suggests that the HTTP request was successful but the attempt to parse the data was not.
i.e. that the data was not formatted as JSONP.