javascript - ajax错误信息 {readyState: 4, status: 200, statusText: "load"}
阿神
阿神 2017-04-11 11:02:44
0
2
1105

用 ajax 发请求时,错误信息中 readyStatestatus 都正常, 而 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 数据:

这是打印的信息

阿神
阿神

闭关修行中......

répondre à tous(2)
阿神

把你的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.

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!