How Can I Use jQuery To Remove Hash Value From URL

How can I use jQuery or Javascript to remove the hash value from URL, like http://www.domain.com/#test. After removing the hash value, the new URL should be like http://www.domain.com/

You can use javascript native function – substr to remove the hash value from URL

var ulr = "http://softwarehtec.com/#test"
var newurl = url.substr(0,url.indexOf('#'));
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments