66270948
小狐狸
小狐狸
  • UID16309
  • 注册日期2006-12-19
  • 最后登录2007-10-03
  • 发帖数6
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
阅读:11404回复:6

firefox 的responseXML.xml 问题

楼主#
更多 发布于:2006-12-19 11:05
用 XMLHttpRequest 对象的
responseXML.xml 为什么在 ie 里面 可以获取数据 而 firefox 却得到 undefined 呢?

    var xmldoc = new XMLHttpRequest();

    xmldoc.open('GET',src, false);
    xmldoc.send('');
alert("123");

    return xmldoc.responseXML.xml

这么写的
 xmldoc.responseText 可以得到数据  xmldoc.responseXML.xml 却不可以


var parser = new DOMParser();
xml = parser.parseFromString(xmldoc.responseXML.xml, "text/xml");
的方法也试过了 得道的仍然是 undefined
用 XMLSPY检查了 格式也是良好的呀

我的ie是 7.0 的 firefox是2.0
66270948
小狐狸
小狐狸
  • UID16309
  • 注册日期2006-12-19
  • 最后登录2007-10-03
  • 发帖数6
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
1楼#
发布于:2006-12-19 11:05
是 responseXML 的 .xml方法 啊 用 responseXML.Text的到的也是 undefined
直接用 responseXML 的到的是 Object XMLdocument
66270948
小狐狸
小狐狸
  • UID16309
  • 注册日期2006-12-19
  • 最后登录2007-10-03
  • 发帖数6
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
2楼#
发布于:2006-12-19 11:05
请问谁知道啊 ?
游客

返回顶部