I have read a lot of other questions on how to change the URL with out reloading the page. This is my code that I have just wondering if someone can tell me what I am doing wrong? When I click the button it doesn't change the url. This is my exact code and not sure what I have done wrong, Thanks.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Social Media </title>
</head>
<body>
<input type="button" value="Page1" onclick="ChangeUrl('Page1','Page1.htm');" />
<script type="text/javascript">
function ChangeUrl(title, url) {
window.history.pushState("object or string", "Title", "/new-url");
}
</script>
</body>
</html>
I want the new url to have /new-url onto the end. Thanks