【问题标题】:The Submit Button doesn't work in Chrome or Firefox, but Works in Internet Explorer提交按钮在 Chrome 或 Firefox 中不起作用,但在 Internet Explorer 中起作用
【发布时间】:2013-11-29 13:53:29
【问题描述】:

我遇到过这样一种情况,如果您在 Firefox 和 Chrome 中单击提交按钮,它就不起作用,但在 Internet Explorer 中它应该可以正常工作。

更奇怪的是,我发现我可以“制表”到按钮并按 Enter 键,这样就可以了。这是表单代码的一部分:

<form id="product_form" name="product_form" method="post" onsubmit="return validateProductForm();" action="product-photo-mail.php" enctype="multipart/form-data">

 <table width="100%" border="0">
    <tr>  
        <td class = "left_side" width="30%">Quantity:</td>
        <td class = "right_side" width="60%">
            <select name = "quantity_cards">

                <option>50</option>
                <option>75</option>
                <option>100</option>
                <option>125</option>
                <option>150</option>
                <option>more</option>
            </select>
        </td>
    </tr>
    .
    .
    .


    <tr>
        <td colspan="2" align="center">You're almost done!</td>
    </tr>

   <tr>
        <td colspan="2" align="center"><br />After you submit your order we will send over your digital proof for approval!</td>
   </tr>
     <tr>
        <td colspan="2" align="center">
            <input type="submit" name="button1" id="button1" class="formbutton" value="Submit My Order" />
        </td>
    </tr> 
</table>
</form>`

当我将按钮移到文本上方时,它可以在所有浏览器上运行,正如我所期望的那样。我不知道为什么会这样。我花了几个小时试图让它工作,我唯一能做的就是交换订单:

    .
    .

    <tr>
        <td colspan="2" align="center">
            <input type="submit" name="button1" id="button1" class="formbutton" value="Submit My Order" />
        </td>
    </tr>   
    <tr>
        <td colspan="2" align="center">You're almost done!</td>
    </tr>

   <tr>
        <td colspan="2" align="center"><br />After you submit your order we will send over your digital proof for approval!</td>
   </tr>

</table>
</form>

我想先有文本和提交按钮,但我无能为力。有谁之前经历过这个吗?

【问题讨论】:

    标签: javascript php html google-chrome submit


    【解决方案1】:

    不能提供链接吗?

    可能没有隐藏元素覆盖您的提交按钮?这可以解释为什么您可以选择按钮,但不能单击它。

    【讨论】:

      【解决方案2】:

      尝试使用&lt;button&gt; 标签而不是&lt;input&gt;

      【讨论】:

      • 这是评论,不是答案。
      • 这没有提供问题的答案。要批评或要求作者澄清,请在其帖子下方发表评论。
      • @Stephane Delcroix 不是一个模组,所以我认为没有必要让他不请自来的警务工作。在我看来,我认为他是在放纵自我之旅。
      猜你喜欢
      • 1970-01-01
      • 2011-11-26
      • 2020-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-27
      • 1970-01-01
      相关资源
      最近更新 更多