Location

NameDescriptionReturns
assign(URL)Navigates to the specified URL.void
hashGets or sets the hash component of the document URL, for example "#myID".string
hostGets or sets the host component of the document URL, for example "www.java2s.com:80".string
hostnameGets or sets the host name component of the document URL, for example "www.java2s.com".string
hrefGets or sets the current document's location, full URL of the loaded page, for example "http://www.java2s.com".string
pathnameGets or sets the path component of the document URL, for example "/Book/HTML-CSS/".string
portGets or sets the port of the document URL, for example "8080".string
protocolGets or sets the protocol of the document URL, for example "http:".. Typically "http:" or "https:"string
reload()Reloads the current document.void
replace(URL)Removes the current document and navigates to the one specified by the URL.void
resolveURL(URL)Resolves the specified relative URL to an absolute one.string
searchGets or sets the query component of the document URL, for example "?q=javascript".string
toStringReturns the full URL of the loaded pagestring
Home 
  JavaScript Book 
    JavaScript Reference  

JavaScript Reference:
  1. Array class
  2. Date class
  3. Math class
  4. Number class
  5. String class
  6. Document
  7. History
  8. The HTMLElement Members
  9. Window
  10. Screen
  11. Navigator
  12. Location
  13. html tag and its cooresponding JavaScript class