HTML DOM HashChangeEvent
HashChangeEvent object
An event that occurs when the anchor part of the URL changes, belongs to the HashChangeEvent object.
HashChange event properties and methods
Properties/methods | Description |
---|---|
newURL | Returns the document URL after the hash change. |
oldURL | Returns the document URL before the hash change. |
Inherited properties and methods
HashChangeEvent inherits all properties and methods from the following objects:
Event type
These event types belong to the HashChangeEvent object:
Event | Description |
---|---|
onhashchange | This event occurs when the anchor part of the URL changes. |