Created
April 10, 2019 13:24
-
-
Save Kcko/cd0a535314f9b31eae832402fad81b74 to your computer and use it in GitHub Desktop.
@link http://talkerscode.com/webtricks/change-browser-url-without-refreshing-page-using-jquery-and-html5.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="url_style.css"> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript"> | |
function changeurl(url) | |
{ | |
var new_url="/Your URL/"+url; | |
window.history.pushState("data","Title",new_url); | |
document.title=url; | |
} | |
</script> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<div id="url_link"> | |
<p id="url_label">Click On Languages To Change URL</p> | |
<li onclick="changeurl('PHP');">PHP</li> | |
<li onclick="changeurl('HTML');">HTML</li> | |
<li onclick="changeurl('CSS');">CSS</li> | |
<li onclick="changeurl('JavaScript');">JavaScript</li> | |
<li onclick="changeurl('jQuery');">jQuery</li> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment