Location Object
The hash property returns the anchor portion of a URL, including the hash sign (#).
![]()
The hash property is supported in all major browsers.
Return the anchor portion of a URL. Assume that the current URL is http://www.example.com/test.htm#part2:
The output of the code above will be:
Location Object
Your message has been sent to W3Schools.