How to get the browser to navigate to URL in JavaScript [duplicate]

This works in all browsers:

window.location.href="https://stackoverflow.com/questions/1226714/...";

If you wanted to change the page without it reflecting in the browser back history, you can do:

window.location.replace("https://stackoverflow.com/questions/1226714/...");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)