Advertisement
Web Developer Resources
You Are Here: ESQSoft.com ¬ javascript ¬ objects ¬ JavaScript: LOCATION Object
E.S.Q. Software Logo

JavaScript: LOCATION Object

Here are the properties and methods of the JavaScript LOCATION object. In my testing using FireFox and Internet Explorer for Windows, my browsers returned the following:

(property) FireFox Internet Explorer
hash X X
host X X
hostname X X
href X X
pathname X X
port X X
protocol X X
search X X
reload X X
replace X
assign X

Attempting to enumerate the properties your browser returns for this object, and any associated values from the current page.

https://esqsoft.com/javascript/objects/location
PropertyValue
ancestorOrigins[object DOMStringList]
hrefhttps://esqsoft.com/javascript/objects/location
originhttps://esqsoft.com
protocolhttps:
hostesqsoft.com
hostnameesqsoft.com
port
pathname/javascript/objects/location
search
hash
assignfunction assign() { [native code] }
reloadfunction reload() { [native code] }
replacefunction replace() { [native code] }
toStringfunction toString() { [native code] }
Script: Expose (expose DOM element) -- << click here to copy code >>
More Web Stuff: Tools, How-To, Design, Games, Hosting @ http://www.esqsoft.com
Advertisement
Advertisement
Statcounter