JavaScript document documentURI Property Tutorial

In this section we will learn what the document documentURI property is and how to use it in JavaScript.

What is document documentURI Property in JavaScript?

The JavaScript document documentURI property is used to set or get the location (full directory) of the document that is currently loaded on a browser.

document documentURI Property Syntax:

document.documentURI;

document.documentURL = LocationURI;

document documentURI Property Input Value

The property can take one value and that is a URI, which will be considered as the location of the currently loaded document.

document documentURI Property Return Value

The return value of this property is the full path of the currently loaded document on a browser window.

Example: using document documentURI Property in JavaScript

See the Pen using document documentURI Property in JavaScript by Omid Dehghan (@odchan1) on CodePen.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies