Return the anchor part of a link:
The result of x will be:
The hash property sets or returns the anchor part of the href attribute value.
The anchor part is the part of the URL after the hash sign (#).
Note: When this property is used to set the anchor part, do not include the hash sign (#).
The hash property is supported in all major browsers.
Return the hash property:
Set the hash property:
|anchorname||Specifies the anchor part of a URL|
|Return Value:||A String, representing the anchor part of a URL, including the hash sign (#)|
Change the anchor part of a link: