Change URL of a saved HTML file
- by Paul Camilleri
I am new to HTML so this question might sound a bit lame. Anyways I have a saved webpage on my desktop that when i open it in google chrome i want it to show a specific URL instead of its current location. Any ideas how i might get this to work?
I tried using the history.pushState but i have no idea why it is not working. I created a simple page for now to test it:
<html>
<head>
<script>
function setURL()
{
history.pushState("Test","page2", "www.test.com");
}
</script>
</head>
<body>
<button type="button" onclick="setURL()">Set Url</button>
</body>
</html>
Any help would be greatly appreciated. Thank you