showing results for - "how do i redirect to another webpage"
Aarón
20 Jul 2020
1// similar behavior as an HTTP redirect
2window.location.replace("http://stackoverflow.com");
3
4// similar behavior as clicking on a link
5window.location.href = "http://stackoverflow.com";
6
7// Another method for doing redirecting with JavaScript is this:
8window.location = "https://stackoverflow.com";