Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
HTML DOM Anchor port Property
The HTML DOM Anchor port property is used to set or return the port of the href attribute.
Following is the syntax to set the port property?
anchorObj.port = num
Above, num is the port number of the url.
Following is the syntax to return the port property?
anchorObj.port
Let us now see an example to implement the DOM Anchor port property?
Example
Demo heading
Output

Above, click on "Display port" to display the port number?

Advertisements
