XML DOM documentURI 属性

定义和用法
documentURI 属性设置或返回文档的位置。
语法
documentObject.documentURI
实例
下面的代码片段使用 loadXMLDoc() 把 "books.xml" 载入 xmlDoc 中,并显示 XML 文档的位置:
实例
xmlDoc=loadXMLDoc("books.xml");
document.write("Document location: " + xmlDoc.documentURI);
document.write("Document location: " + xmlDoc.documentURI);
输出:
Document location: /try/demo_source/books.xml
尝试一下 »
