jQuery - 使用帖子数据重定向 [英] jQuery - Redirect with post data
本文介绍了jQuery - 使用帖子数据重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用帖子数据重定向?
How can I redirect with post data?
如何使用 $_POST
移动到新页面?
How to move to new page with $_POST
?
如何做到这一点?是怎么做的,为什么要这样做
How to do this? How is it done and whyfore shall it be done
推荐答案
有一个 JQuery 插件几乎可以完成您想要做的事情:https://github.com/mgalante/jquery.redirect/blob/master/jquery.redirect.js.
There is a JQuery plug-in that accomplishes pretty much what you're trying to do: https://github.com/mgalante/jquery.redirect/blob/master/jquery.redirect.js.
在包含 JQuery 和 jquery.redirect.min.js 插件后,您可以简单地执行以下操作:
After including JQuery and the jquery.redirect.min.js plug-in, you can simply do something like this:
$().redirect('demo.php', {'arg1': 'value1', 'arg2': 'value2'});
在较新的 JQuery 版本上改用以下代码:
Use the following code on newer JQuery versions instead:
$.redirect('demo.php', {'arg1': 'value1', 'arg2': 'value2'});
希望这有帮助!
这篇关于jQuery - 使用帖子数据重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文