无法在提交时重定向表单 [英] can't redirect form on submit
本文介绍了无法在提交时重定向表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的 - 我知道我是个白痴,但我似乎无法像我想要的那样获得此表单的重定向:
Ok - I know I am being an idiot but I can not seem to get this form to redirect as I want it to:
<form id="post" method="post" action="" name="post" onSubmit="window.location='http://www.website.com/overview'" >
<input type="hidden" name="terms-and-conditions" value="true">
<p class="submit">
<input id="agree" type="submit" value="I Agree" name="agree">
<input type="button" value="I Disagree" onClick="window.location='http://www.website.com'">
</p>
</form>
当按钮类型是submit时,它不会在我的PHP页面中重定向。我有一种感觉,我失去了明显的东西......
When the button type is "submit" it won't redirect in my PHP page. I have a feeling I am missing something obvious...
谢谢!
推荐答案
$ p
$ b
just do
<form id="post" method="post" action="http://www.website.com/overview" name="post">
这篇关于无法在提交时重定向表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文