HTML DOM documentURI property
Example
Get the local URI of the document:
document.documentURI;
Output result:
http://www.w3cschool.cc/jsref/prop-document-documenturi.html
Try it »
Definition and Usage
The documentURI property can set or return the location of the document.
If the document was created by a DocumentImplementation object, or if it is undefined, it returns null.
Browser support





All browsers except Internet Explorer support the documentURI property.
Syntax
Set the documentURI of the document:
document.documentURI=
locationURI
Return the documentURI:
document.documentURI
Technical Details
| Return Value: | String representing the URI of the document. |
|---|---|
| DOM version | Core Level 3 Document Object |
Document Object