Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

location HTML Object

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

The location object contains information about the current URL.

Property Data type Access Description

hash

String

Read/write

Sets or retrieves the part of URL starting from the pound sign (#) inclusive and beyond. If you change the hash, the browser scrolls up or down to the appropriate bookmark but the hash property does not reflect the change.

host

String

Read/write

Sets or retrieves the hostname of the page location.

In Internet Explorer Mobile, this property does not return the port number.

hostname

String

Read/write

Sets or retrieves the host name part of the page location.

href

String

Read/write

Sets or retrieves the entire URL as a string.

pathname

String

Read/write

Sets or retrieves the file name or path of the page location.

port

String

Read/write

Sets or retrieves the port number associated with the URL.

search

String

Read/write

Sets or retrieves the search (query) string portion of the URL. This includes the leading question mark.

Method Syntax Description

reload

location .reload

Reloads the current page.

This method does not take the ReloadSource parameter, which specifies whether to check reload the page from the browser's cache or to reload it from the server. Internet Explorer Mobile always checks against the server if the user is online.

replace

location .replace( URL )

Replaces the current document by loading the document at the specified URL (in the required URL parameter).

Windows MobilePocket PC 2000 and later, Smartphone 2002 and later

Community Additions

Show:
© 2014 Microsoft