Answers for "how to redirect one page to another page using jquery and ajax"

13

jquery redirect to another webpage

$(location).attr('href', 'https://google.com');
Posted by: Guest on February-25-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 "how to redirect one page to another page using jquery and ajax"

Code answers related to "Javascript"

Browse Popular Code Answers by Language