Name

port — NN 2 IE 3 DOM 1

Synopsis

Read/Write

The port component of the URL, if one exists. This consists of all URL information following the colon after the last character of the domain name. The colon is not part of the port property value.

Example

location.port = "80"

Value

String (a numeric value as string).

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.