Successfully added
Code Snippets
by Patrik
Change URL in Browser Address Bar
The following script will change the URL in the browser address bar. This includes updating the title and the link.
<script type="text/javascript">
function ChangeUrl(title, url) {
if (typeof (history.pushState) != "undefined") {
var obj = { Title: title, Url: url };
history.pushState(obj, obj.Title, obj.Url);
} else {
alert("Browser does not support HTML5.");
}
}
ChangeUrl("Title", "Link");
</script>
Referenced in:
Leave a Comment
All fields are required. Your email address will not be published.
Comments(10)
Eugenebes
3/22/2024 5:58:57 AMEugenebes
3/22/2024 2:09:32 AMEugenebes
3/21/2024 10:20:04 PMVictorjfx
3/21/2024 10:10:30 PMLhaneKeect
3/21/2024 7:27:32 PMVictorjfx
3/21/2024 3:06:58 PMVictorjfx
3/20/2024 10:45:14 PMRickeyhoora
3/20/2024 6:51:14 PMCalvinDub
3/20/2024 5:45:01 PMpletcherjtn
3/20/2024 4:43:44 PM