XDomainRequest在状态为200时没有给出响应
var httpRequest = new XDomainRequest();
httpRequest.open('POST', url, true);
httpRequest.send(xmlDocument);
alert(httpRequest.responseText);
return httpRequest;
它将响应文本设为null。 PLZ指导我失踪的地方。
答案 0 :(得分:1)
尝试做:
var httpRequest = new XDomainRequest();
httpRequest.onload=function() {
alert(httpRequest.responseText);
}
httpRequest.open('POST', url, true);
httpRequest.send(xmlDocument);