To get the current page URL, Use below code:
var currentURL = window.location;If you want to get hash value from current page URL, we just need to add .hash in the above javascript statement like:
var currentHashURL = window.location.hash; This code snippet for Get a Hash Value From Current Page URL In JavaScript.
To get the current page URL, Use below code:
var currentURL = window.location;If you want to get hash value from current page URL, we just need to add .hash in the above javascript statement like:
var currentHashURL = window.location.hash;