2012-01-28 63 views
0
<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> 

這是我的表格,我不知道爲什麼這不適用於Firefox,你能幫我嗎? 自從幾周前我一直在閱讀數以百計的答案,但我無法使其工作。表格不能在火狐上提交

+0

你是如何提交表單。它只在你有 作爲提交按鈕時纔有效。 – Jashwant 2012-01-28 16:44:50

+0

你不能把'

'元素放在''元素裏面。 – 2012-01-28 16:45:07

+1

嘗試驗證您的代碼爲有效的html,然後使用新代碼編輯您的問題,如果您有同樣的問題。 – 2012-01-28 16:46:10

回答

0

您必須爲圖像輸入字段指定名稱。

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

可以使用POST變量yourimage.x/yourimage.y(或在PHP yourimage_x,yourimage_y)訪問x/y值。

+0

謝謝,我給了一個圖像的名字,但它仍然不起作用。 2012-01-28 16:49:07

+0

如果我使用提交按鈕,我不想那樣。 – 2012-01-28 17:08:12

-1

我有沒有ID的表單和輸入的問題,嘗試給表單和表單元素的id和添加type =「提交」到您的提交按鈕。

+0

它與'id'無關' – 2012-01-28 16:46:52

+0

謝謝,我之前嘗試過,似乎沒有工作。 – 2012-01-28 17:21:17

2

1)你不能像你那樣在表格中放置你的表單。

2)您正在關閉您的表格(</table>)兩次。

3)您從未關閉過您的行(</tr>)。

試試這個簡單的代碼來代替:

<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> 
+0

我現在嘗試了,沒有成功= S – 2012-02-04 18:56:31

+0

我再次嘗試,並得到一些較少的錯誤,謝謝 – 2012-02-14 04:56:53