change the window location javascript code example
Example 1: js change url
window.location.href = "www.google.com";
Example 2: window replace url
location.replace("url");
window.location.href = "www.google.com";
location.replace("url");