asp.net.ph

Skip Navigation Links

hostName Property

location Properties   DHTML Objects


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

Syntax


HTML N/A
Script object.hostName [ = sHostname ]

Possible Values


sHostname String specifying the host and domain name or the numerical IP address.

The property is read/write with no default value.

Remarks

If no host name is available, this property returns an empty string.

Example

The following example displays the location hostName property in a message box.

alert ( location.hostName ) 

 Show me 

Applies To

A, AREA, location



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note