Window.location (Property)

A reference to the location object that represents the URL of the current window content.

Availability:

JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Opera - 3.0
Property/method value type:Location object
JavaScript syntax:-location
-myWindow.location

The attributes of the object referred to by this property can be read or written to cause the window content to be reloaded under script control.

The object itself ought to be considered read only but its properties are modifiable. Consult the document for the location object for details of what you can read or write. In particular, refer to the window.location.href value as a way to load a new document into the window.

Warnings:

See also:Document.location, Document.referrer, Document.URL, Frame object, Location object, Window object, Window.navigate()

Property attributes:

ReadOnly.