how to change page javascript code example
Example 1: js onclick redirect
<button onclick="location.href='www.yoursite.com'">Click Me</button>
Example 2: redirect with javascript
window.location.replace('http://mywebsite.com/home.html');
Example 3: js go to page
window.location.href = "http://example.com/new_url";