Location : Object
Location describes the url of the current page. It is available through the window.location
property. See also History.
Property | Value |
---|---|
href | 'http://username:[email protected]:80/pathname?search=terms#hash' |
protocol | 'http:' |
username | 'username' |
password | 'password' |
hostname | 'www.javascripture.com' |
port | '80' |
host | 'www.javascripture.com:80' |
origin | 'http://www.javascripture.com:80' |
pathname | '/pathname' |
search | '?search=terms' |
hash | '#hash' |
Instance Properties
hash : String
The hash portion of Location. This is the '#'
and everything following it. Use the window.onhashchange
event to listen for changes to the hash.
Example:
RunResults:
host : String
href : String
The concatenation of all parts of the Location into one string. You can set href
to cause the browser to navigate to a new location.
Example:
RunResults:
origin : String
port : String
The port of the current Location. May be ''
if the port is the not specified in the Location.
Example:
RunResults:
Instance Methods
Copyright © JavaScripture Contributors