XML DOM documentURI özelliği

Document nesnesi referans el kitabı

Tanım ve kullanım

documentURI özelliği belgenin konumunu ayarlamak veya döndürebilir.

Sözdizimi:

documentObject.documentURI

Örnek

Tüm örneklerde XML dosyasını kullanacağız books.xmlve JavaScript fonksiyonları loadXMLDoc().

Aşağıdaki kod parçası XML belgesinin konumunu gösterebilir:

xmlDoc=loadXMLDoc("/example/xdom/books.xml");
document.write("Document location: " + xmlDoc.documentURI);

Çıktı:

Document konumu: http://www.codew3c.com/example/xdom/books.xml 

Document nesnesi referans el kitabı