![]() |
VOOZH | about |
The Anchor pathname Property in HTML DOM is used to set or return the path name part of the href attribute value.
Syntax:
anchorObject.pathnameanchorObject.pathname = pathProperty Values: It contains the value i.e. path which specify the path name of the URL.
Return Value: It returns a string value which represents the path name of the URL.
Example 1: This example returns the path name of the URL.
Output:
Example 2: This example sets the path name of the URL.
Output:
Supported Browsers: