location Properties DHTML Objects
Sets or retrieves the host name part of the location or URL.
HTML |
N/A |
Script |
object.hostName [ = sHostname ] |
sHostname |
String specifying the host and domain name or the numerical IP address. |
The property is read/write with no default value.
If no host name is available, this property returns an empty string.
The following example displays the location hostName property in a message box.
alert ( location.hostName )
Show me
A, AREA, location