Easy learning with example program codes

Redirect a url using javascript

We can use window.location.replace(…) or window.location.href to redirect a url using javascript.

//Behave as an HTTP redirect

//Behave as clicking on a link
window.location.href = "";

Related topics:

Please follow and like us:

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki