DOM Objects
DOM Anchor
DOM Applet
DOM Area
DOM Base
DOM Basefont
DOM Body
DOM Button
DOM Checkbox
DOM Document
DOM Event
DOM FileUpload
DOM Form
DOM Frame
DOM Frameset
DOM Hidden
DOM History
DOM Iframe
DOM Image
DOM Link
DOM Location
DOM Meta
DOM Navigator
DOM Option
DOM Password
DOM Radio
DOM Reset
DOM Screen
DOM Select
DOM Style
DOM Submit
DOM Table
DOM TableData
DOM TableHeader
DOM TableRow
DOM Text
DOM Textarea
DOM Window

Location Object

The Location object contains information about the current URL.

Note: The Location object is not a W3C standard.

The Location object's properties and methods are described below:

N: Netscape (including Mozilla when N6 or higher), IE: Internet Explorer, W3C: World Wide Web Consortium (Internet Standard)

Properties

Syntax: object.property_name

Property Description N IE W3C
hash Sets or returns the part of the href property that follows the hash sign (#) 2 3 No
host Sets or returns the hostname and port number of the location or URL 2 3 No
hostname Sets or returns the hostname of the location or URL 2 3 No
href Sets or returns the entire URL 2 3 No
pathname Sets or returns the file name or path specified by the location object 2 3 No
port Sets or returns the port number associated with the URL 2 3 No
protocol Sets or returns the protocol part of the URL 2 3 No
search Sets or returns the part of the href property that follows the question mark (?) 2 3 No

Methods

Syntax: object.method_name()

Method Description N IE W3C
assign("URL") Loads a new document 2 4 No
reload(false|true) Reloads the current document 2 4 No
replace("URL") Replaces the current document with the one specified 3 4 No