<html>
<body>
<h1>The Window Location Object</h1>
<h2>The assign Property</h2>
<button onclick="myFunction()">Load new document</button>
<script>
function myFunction() {
location.assign("https://www.w3schools.com");
}
</script>
</body>
</html>