Edit This Code:
<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Load new document</button>

<script>
function myFunction() {
    location.assign("http://www.w3schools.com");
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy