【问题标题】:Form submit does not response for iPhoneiPhone 的表单提交没有响应
【发布时间】:2021-01-15 00:48:15
【问题描述】:

我在 iPhone 6、6s 和 8 手机中遇到了这样的挑战:当用户单击 HTML 表单中的提交按钮时,它不会重定向到另一个网站

<form name="online" id="form" action="www.abc.com" method="post" enctype="application/x-www-form-urlencoded" accept-charset="UTF-8">
                    <input type="hidden" name="RETURN_URL" value="example.com/callback">
                    <p class="edgeBox_Outer Adjust04">
                        <input type="submit" id="submit" 
                                style="background: none;border: none;color:#fff;font-size: 90%;font-weight: bold; width:100%; " 
                                value ="Submit">
                    </p>

你能请任何人帮助我解决这个问题吗?

【问题讨论】:

  • 如果您有action="www.abc.com",那么不,它不会转到另一个域,因为www.abc.com 被解释为相对路径,而不是域。这应该适用于所有浏览器,而不仅仅是 iOS。如果你想引用不同的域,你需要一个以http://开头的绝对URI…

标签: javascript html node.js ejs


【解决方案1】:

你留下了表单&lt;/form&gt;的结束标签,也没有添加http://https://,提交按钮和输入标签也不可见(你可以稍后更改)。

但主要问题是“没有封闭式标签”

<form name="online" id="form" action="https://www.example.com" method="post" enctype="application/x-www-form-urlencoded" accept-charset="UTF-8">

<input type="text" name="RETURN_URL" value="example.com/callback">

<p class="edgeBox_Outer Adjust04"><input type="submit" id="submit" style="background: none; border: none; color: red; font-size: 90%;font-weight: bold; width:100%;" value ="Submit"> </p>

</form>

【讨论】:

  • 是的。我这样做了,但页面没有被重定向,这个问题只在 iPhone 上
  • 是的。但我现在面临的挑战是在安卓设备上工作而不是在 iPhone 设备上工作
  • 这很奇怪,您是否收到任何关于它为什么不起作用的回应?您是否收到“无法打开网站太多重定向”之类的信息??
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-11-28
  • 2013-10-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多