HashChangeEvent newURL property

Definition and usage

The newURL property returns the document's URL, after the hash (anchor part) has changed.

This is the URL navigated to. To get the URL the navigation left, please use oldURL Properties.

This property is read-only.

Tip:To set or return the URL's hash, use location.hash Properties.

Example

After changing the hash, get the URL we want to navigate to:

event.newURL;

Try it yourself

Syntax

event.newURL

Technical details

Return value: String value indicating the URL navigated to.

Browser Support

The numbers in the table indicate the first browser version that fully supports the property.

Properties Chrome IE Firefox Safari Opera
newURL 5.0 Not Supported 6.0 5.0 10.6