【问题标题】:What is use of name attribute in submit button php [duplicate]提交按钮php中名称属性的用途是什么[重复]
【发布时间】:2020-12-04 20:43:13
【问题描述】:
<form action="php.php" method="post">
<input name="username"></input>
<input name="password"></input>
<button type="submit" name="submit">submit</button>
</form>

提交按钮中名称属性的用途是什么?谢谢告知

【问题讨论】:

    标签: php forms button attributes submit


    【解决方案1】:

    主要目的是在表单上有多个提交按钮的情况下,能够检测点击了哪个按钮来发送表单。

    在大多数情况下,就像问题中描述的那样,不需要命名提交按钮。

    还要检查这个question

    【讨论】:

      猜你喜欢
      • 2018-02-09
      • 1970-01-01
      • 2011-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-15
      相关资源
      最近更新 更多