This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

URL

Summary

Sets or gets the URL for the current document.

Property of dom/Windowdom/Window

Syntax

var string = document.URL;
document.URL = value;

Return Value

Returns an object of type StringString

the URL of the current web document.

Examples

This example function returns the URL property of the current document.

function getURL()
{
    return document.URL;
}

Notes

Remarks

The URL property is case-sensitive. This property is an alias for the location.href property on the window.

Syntax

Standards information

Attributions