Return the pathname of the URL for a specific area in an image-map:
The result of x could be:
The pathname property sets or returns the pathname part of the href attribute value.
The href attribute specifies the destination of a link in an area.
Note: In the example above, IE 9 and earlier versions returns "jsref/venus.htm", while IE 10+, Firefox, Opera, Chrome, and Safari returns "/jsref/venus.htm".
The pathname property is supported in all major browsers.
Return the pathname property:
Set the pathname property:
Value | Description |
---|---|
path | Specifies the pathname of a URL |
Return Value: | A String, representing the pathname of the URL |
---|
Change the path name of the URL for a specific area in an image-map: