Name

location — NN 2 IE 3 DOM 1

Synopsis

Read/Write

The URL of the current document. This property was deprecated in Navigator starting with Version 3. Navigator prefers the document.URL property to reflect this value. To navigate to another page, you should assign a URL to the location.href property.

Example

document.location = "products/widget33.html"

Value

A full or relative URL as a string.

Default

Document URL.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.