【问题标题】:Button HTML will not submit form in IE7按钮 HTML 不会在 IE7 中提交表单
【发布时间】:2011-07-06 13:50:32
【问题描述】:

谁能告诉我为什么这个表单不能在 IE7 中提交?

<form id="orderform" name"orderForm" action="http://www.mydomain.com/secure/delivery-details.html" method="post">
<a  id="add">+</a>
 <table id="ordertable" width="533" border="0" cellspacing="0" cellpadding="2">
  <tbody>
    <tr class="titles">
      <td style="width:100px">Code (e.g 66203)</td>
      <td style="width:100px">Mtrs (e.g 10)</td>
      <td style="width:100px">Order Line Ref.</td>
      <td>Image</td>
    </tr>
    <tr class="item">
      <td class="prodcode"><input type="text" name="prodcode[]" id="prodcode" class="trigger" /></td>
      <td class="meterage"><input type="text" name="meterage[]" id="meterage" /></td>
      <td class="orderlineref"><input type="text" name="orderlineref[]" id="orderlineref" /></td>
      <td class="imgsample"></td>
    </tr>
    </tbody>
  </table>
  <button type="button" value="submit">Submit</button>
</form>

【问题讨论】:

标签: forms button internet-explorer-7


【解决方案1】:

试试&lt;button type="submit" value="submit"&gt;Submit&lt;/button&gt;

【讨论】:

  • @Andy 不要忘记接受问题的答案。谢谢
  • 我不会 :) 但是有时间限制,我需要尽快完成 - 准确地说是 11 分钟 :)
【解决方案2】:

按钮本身将不起作用,因为它没有关联的操作。对象的正确 HTML 类型是

<input type="submit" name="submitter" value="Submit"/>

这样,当你点击按钮时,浏览器就会知道该做什么

【讨论】:

    猜你喜欢
    • 2016-03-14
    • 2012-01-03
    • 2014-03-23
    • 2011-02-19
    • 1970-01-01
    • 1970-01-01
    • 2016-12-04
    相关资源
    最近更新 更多