【发布时间】: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