go to another page using javascript code example Example: go to another page using javascript window.location.href = "http://mywebsite.com/home.html";