Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Area host Property

Area host Property

Area Object Reference Area Object


Definition and Usage

The host property can set or return the hostname:port part.

Syntax

areaObject.host=

hostname:port


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the host property.


Tips and Notes

Note: If the port part is not specified in the URL, or the port is 80 (the default), some browsers will not display the port part.


Example

Example

The following example returns the hostname and port of the "Venus" region:

Runoob Tutorial(runoob.com) Venus

Hostname:port of the Venus region:

Note:If the URL's port part is not specified, or is 80 (the default), some browsers will not display the port part.

The example above produces the following output:

Hostname:port of the Venus region: www.runoob.com

Try it »


Area Object Reference Area Object