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