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
- Document Object Model (DOM) Level 1 Specification, Section 2.4
Attributions
Mozilla Developer Network : [document.URL Article]
Microsoft Developer Network: [URL Property Article]