The HashChangeEvent
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML DOM HashChangeEvent

❮ DOM Events ❮ Event Objects


The HashChangeEvent Object

Events that occur when the anchor part of the URL changes, belongs to the HashChangeEvent Object.


HashChangeEvent Properties and Methods

Property/Method Description
newURL Returns the URL of the document, after the hash has been changed
oldURL Returns the URL of the document, before the hash was changed

Inherited Properties and Methods

The HashChangeEvent inherits all the properties and methods from:

The Event Object


Event Types

These event types belongs to the HashChangeEvent Object:

Event Description
onhashchange The event occurs when there has been changes to the anchor part of a URL

❮ DOM Events ❮ Event Objects