javascript redirect to other local html file javascript code example Example: javascript redirect window.location.href = "http://mywebsite.com/home.html";