简体   繁体   English

XDomainRequest状态为200时未给出响应

[英]XDomainRequest not giving response while status is 200

XDomainRequest not giving response while status is 200 XDomainRequest状态为200时未给出响应

var httpRequest = new XDomainRequest();
httpRequest.open('POST', url, true);
httpRequest.send(xmlDocument);
alert(httpRequest.responseText);
return httpRequest;

it is giving response text null. 它使响应文本为空。 plz guide me where i am missing. 请引导我在哪里我想念。

try doing: 尝试做:

var httpRequest = new XDomainRequest();
httpRequest.onload=function() {
    alert(httpRequest.responseText);
}
httpRequest.open('POST', url, true);
httpRequest.send(xmlDocument);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM