javascript document redirect code example Example: javascript document redirect window.location.href = "http://mywebsite.com/home.html";