模拟器下正常运行,但是在浏览器下请求后,这里的xhr.readyState 为4 ,xhr.status的状态值始终为0,当然也没有获得任何返回值;请问一下是什么问题。附上代码:
var xhr = cc.loader.getXMLHttpRequest();
xhr.open(this._type, url);
xhr.onreadystatechange = function(){
if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status <= 207))
{
jsonTxt = xhr.responseText;
console.log("http httpResponse...responseTxt:" + jsonTxt);
}
}.bind(this);
xhr.send(param);