在不同环境中,获取文档节点的方法不同,具体说明如下: 在文档内部节点,使用ownerDocument访问。 在脚本中,使用document访问。 在框架页,使用contentDocument访问。 在异步通信中,使用XMLHttpRequest对象的responseXML访问。