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