简体   繁体   English

表单未在Firefox上提交

[英]Form doesn't submit on Firefox

<table width=100% cellspacing=0 cellpadding=0 class="form_table">

<form name="suggestion_box" action="suggestion_box.php" method=post>
<input type="hidden" name="form_submit" value="1">
<tr>
<td width=40% align=right valign=top class="form_label_cell">
<b class="form_label">
First Name<br>
</b>
</td>
</table>
<br>
<input type="image" src="button_submit.gif" alt="Submit" class="input_gfx">
<input type="hidden" name="form_submit" value="1">
<br>
</form>
</table>

This is my form, I don't know why that doesn't work with Firefox, can you help me? 这是我的表格,我不知道为什么它不适用于Firefox,您能帮我吗? I've been reading hundreds of answers since weeks ago, but I couldn't make it work. 自几周前以来,我一直在阅读数百个答案,但我无法使其正常工作。

1) You can't place your form within the table like that. 1)您不能将表格那样放置在表格中。

2) You are closing your table ( </table> ) twice. 2)您两次关闭表( </table> )。

3) You never closed your row ( </tr> ). 3)您从未关闭行( </tr> )。

Try this simplified code instead: 请尝试以下简化代码:

<form name="suggestion_box" action="suggestion_box.php" method=post>

   <table width="100%" cellspacing="0" cellpadding="0" class="form_table">

      <tr>
         <td>
            <input type="hidden" name="form_submit" value="1">
         </td>
      </tr>

      <tr>
         <td>
            <b class="form_label">
               First Name
            </b>
         </td>
      </tr>

      <tr>
         <td>
            <input type="submit" src="button_submit.gif" alt="Submit" class="input_gfx">
         </td>
      </tr>

   </table>

</form>

You have to specify a name for your image input field. 您必须为图像输入字段指定一个名称。

<input type="image" name="yourimage" src="button_submit.gif" alt="Submit" class="input_gfx">

You can access the x/y values using the POST variables yourimage.x / yourimage.y (or in PHP yourimage_x, yourimage_y). 您可以使用POST变量yourimage.x / yourimage.y(或在PHP yourimage_x,yourimage_y中)访问x / y值。

我遇到了没有ID的表单和输入的问题,请尝试为表单和表单元素赋予ID,并在您的提交按钮中添加type =“ submit”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM