Answers for "jquery redirect to page that i want"

67

jquery redirect

// similar behavior as an HTTP redirect
window.location.replace("http://stackoverflow.com");

// similar behavior as clicking on a link
window.location.href = "http://stackoverflow.com";
Posted by: Guest on May-14-2020
0

How can I redirect the user from one page to another using jQuery or pure JavaScript?

Solution #1
for Jquery you can use following code
$(location).prop('href', 'https://www.codegrepper.com/profile/shafeeque-ahmad')

Solution #2
for pure javascript you can use following solution

window.location.href='otherpage.com';
 window.location.assign('otherpage.com');
 //and...

 window.location.replace('otherpage.com');
Posted by: Guest on January-14-2022

Code answers related to "jquery redirect to page that i want"

Code answers related to "Javascript"

Browse Popular Code Answers by Language