redirection in javascript code example
Example 1: redirect javascript
window.location.replace("http://stackoverflow.com");
window.location.href = "http://stackoverflow.com";
Example 2: redirect with javascript
window.location.replace('http://mywebsite.com/home.html');
Example 3: How do I redirect to another webpage
window.location.replace("http://stackoverflow.com");
window.location.href = "http://stackoverflow.com";
window.location = "https://stackoverflow.com";
Example 4: javascript link to another page
window.open("http://mywebsite.com/home.html")