安卓微信中用$.ajax提交表单一直返回error

在其他手机浏览器和iphone的微信中都没问题,只有在安卓的微信中会返回error,XMLHttpRequest.status 为 200, XMLHttpRequest.readyState 为 4,textStatus 为 parsererror ,请问这个可能是什么原因?-------------------------------------测试发现6.0版本的微信没有这个问题

$(document).on('click', '.formdialog', function () {
  var obj = $(this);
  var formobj = $(this.form);
  $.ajax({
    type: 'POST',
    url: formobj.attr('action') + '&handlekey=' + formobj.attr('id') + '&inajax=1',
    data: formobj.serialize(),
    dataType: 'xml'
  }).success(function (s) {
    var content = s.lastChild.firstChild.nodeValue;
    content= replaceJs(content);
    localStorage.removeItem("temreplymessage");
    evalscript(s.lastChild.firstChild.nodeValue);
  }).error(function(XMLHttpRequest, textStatus, errorThrown) {
    alert(XMLHttpRequest.status);
    alert(XMLHttpRequest.readyState);
    alert(textStatus);
  });
  return false;
});
阅读 4.1k
2 个回答

返回的数据对吗,能正确转成xml吗

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题