【问题标题】:Custom redirect after submit提交后自定义重定向
【发布时间】:2012-09-15 19:03:41
【问题描述】:

我有这个表格:http://lawb.co.il/HTMLPage.html

当有人点击提交按钮("שלח טופס" ) 时,他们会被自动重定向。

单击"שלח טופס" 按钮后如何防止此操作?

代码在这里http://jsfiddle.net/TCpkb/4/

你能帮我解决一下吗?

【问题讨论】:

标签: javascript jquery forms redirect


【解决方案1】:

而不是input type="submit" 使用

<input type="button" value"submit" onclick="dothis()"/>

<script>
function dothis(){
//do whatyever you want
//for example for custom redirect :-
window.location.href="www.google.com";
}
</script>

【讨论】:

  • 我试过了,它可以工作,但现在我没有收到包含用户填写表单的所有详细信息的电子邮件,为什么?
【解决方案2】:
  1. 您的 HTML 未在给定链接中格式化有两个表单标签(一个表单标签在另一个标签内)先检查您的 html

  2. 在你的表单中action="http://www.emailmeform.com/builder/form/VaHUixmgcX0Qd0BO1a4ho" 所以很明显你的页面重定向到操作 url

请做一些功课

http://www.w3schools.com/tags/att_form_action.asp你可以在这里找到一个示例。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-13
    相关资源
    最近更新 更多