我得到这个错误
NETWORK_ERROR: XMLHttpRequest Exception 101
当尝试从一个站点获取XML内容。这里是我的代码
var xmlhttp;
if(window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
if (xmlhttp==null)
{
alert ("Your browser does not support XMLHTTP!");
return;
}
xmlhttp.onReadyStateChange=function()
{
if(xmlhttp.readyState==4)
{
var value =xmlhttp.responseXML;
alert(value);
}
}
xmlhttp.open("GET",url,false);
xmlhttp.send();
//alert(xmlhttp.responseXML);
}
xmlhttp.open("GET",false);
xmlhttp.send(null);
有没有一个解决方案?