ajax查找错误信息

error: function(XMLHttpRequest, textStatus, errorThrown) {
  alert(XMLHttpRequest.status);
  alert(XMLHttpRequest.readyState);
  alert(textStatus);
},

 

1.ajax返回的是字符串,则返回类型改为:dataType:'text'

2.ajax返回的是json的数据,则返回:dataType:'json'

3.ajax返回的是html的数据,则返回:dataType:'html'

posted @ 2017-03-24 17:56  ppjj  阅读(445)  评论(0编辑  收藏  举报