XML DOM documentURI 屬性
Document 對象
定義和用法
documentURI 屬性設(shè)置或返回文檔的位置。
語法
documentObject.documentURI
實例
下面的代碼片段使用 loadXMLDoc() 把 "books.xml" 載入 xmlDoc 中,并顯示 XML 文檔的位置:
實例
xmlDoc=loadXMLDoc("books.xml");
document.write("Document location: " + xmlDoc.documentURI);
輸出:
Document location: //www.o2fo.com/dom/books.xml
嘗試一下 ?
Document 對象
更多建議: