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

HTML DOM Area port Property

Area port Property

Area Object Reference Area Object


Definition and Usage

The port property can set or return the port part of the href attribute value.

Syntax

areaObject.port=

port


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the port property.


Tips and Notes

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


Example

Example

The following example returns the port in the "Venus" region:

Runoob Tutorial(runoob.com) Venus

Port of the "Venus" region:

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

    

The example above produces the following output:

Port of the "Venus" region: 80

Try it »


Area Object Reference Area Object