Change Browser URL without reloading refreshing page using HTML5 in JavaScript and JQuery

How to Change Browser URL without reloading refreshing page using HTML5 in JavaScript and JQuery
Ankur Rajput
Asked 19-11-2019
21

Answer (1)
function ChangeUrl(page, url) {         if (typeof (history.pushState) != "undefined") {             var obj = {Page: page, Url: url};             history.pushState(obj, obj.Page, obj.Url);         } else {             alert("Browser does not support HTML5.");         }     } ChangeUrl('Page1', ''loading.php');
Deepak Sharma
Asked 24-10-2019
45 Likes
Comments
how to get #variable or any variable from url in javascript
By : Deepak Sharma | 05-11-2019 | 45 Likes
if url is www.example.com#home1 var hash = window.location.hash.substr(1); alert(hash);
By : Ankur Rajput | 05-11-2019 | 45 Likes
Write comment

Submit your answer