📌  相关文章
📜  如何使用 jQuery 或纯 JavaScript 将用户从一个页面重定向到另一个页面? - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:31.304000             🧑  作者: Mango

代码示例1
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');