Answers for "How to get the browser to navigate to a URL in JavaScript"

1

How to get the browser to navigate to a URL in JavaScript

//This works in all browsers:

window.location.href = '...';

/*If you wanted to change the page without it reflecting in the browser back
history, you can do:*/
window.location.replace('...');
Posted by: Guest on April-26-2022

Code answers related to "How to get the browser to navigate to a URL in JavaScript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language