【问题标题】:correct way to create a button for html [duplicate]为html创建按钮的正确方法[重复]
【发布时间】:2017-10-08 02:37:33
【问题描述】:

为什么有不同的方法来创建按钮,以及何时使用哪一种。

<form>
<input type="button">
<button type="button"></button>
</form>

我想解释一下。

【问题讨论】:

  • 使用

标签: html


【解决方案1】:

有几个不同之处,但与您的代码最相关的是

&lt;input type="button"&gt; 作为输入字段在表单发送到 elab 的服务器时提交,您可以在服务器端评估 value 属性的内容分配给输入 nutton

&lt;button type="button"&gt;&lt;/button&gt;只是一个客户端本地标签

【讨论】:

    猜你喜欢
    • 2017-11-01
    • 2010-10-27
    • 2012-07-25
    • 2021-06-24
    • 2013-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-12
    相关资源
    最近更新 更多