how to navigate to a new page on javascript code example Example: javascript redirect window.location.href = "http://mywebsite.com/home.html";