How to redirect a page in JavaScript or jQuery?

Please let me know how to redirect a user from a page to another page using JavaScript or JQuery.

Comments

  • I recommend using pure JavaScript instead of JQuery. Use window.location.replace()

    ex. window.location.replace("http://yoursite.com");

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion