xmlhttp.send返回的responseXML怎样赋值给一个DOM?[在线等]
ai0ai 2006-07-11 10:06:13 * xmlhttp是我自定义的一个对象,用于发送请求。
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc = xmlhttp.responseXML;//问题就是这句
alert(xmlDoc.xml)//内容竟然是空
现在的问题是,xmlhttp对象已经成功send,alert(xmlhttp.responseText)有正确的内容,alert(xmlhttp.responseXML)也是一个[object];xmlDoc创建成功,但是xmlDoc却总是空(非null)。
我在本地运行是正确的,部署到网站上就出这个错误,请各位帮忙看看,有碰到过的这种情况的请不吝赐教啊!