XML DOM documentURI गुण
वर्णन और उपयोग
documentURI
गुण नियत करता है या वापस करता है दस्तावेज़ का स्थान。
व्याकरण
documentObject.documentURI
उदाहरण
इस कोड का उद्देश्य "books.xml" को xmlDoc में लोड करना है और XML दस्तावेज़ का स्थान दिखाना है:
var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { myFunction(this); } }; xhttp.open("GET", "books.xml", true); xhttp.send(); function myFunction(xml) { var xmlDoc = xml.responseXML; document.getElementById("demo").innerHTML = "Document location: " + xmlDoc.documentURI; }