【问题标题】:What is the difference between these two buttons? [duplicate]这两个按钮有什么区别? [复制]
【发布时间】:2012-03-21 17:45:35
【问题描述】:

这两个按钮有什么区别?

<button>caption</button>
<input type="button" value="caption" />

【问题讨论】:

    标签: html button


    【解决方案1】:

    button 元素可以包含其他 HTML 元素,例如图像。

    参见此处:http://dev.w3.org/html5/spec/the-button-element.html#the-button-element

    【讨论】:

      【解决方案2】:

      http://www.w3schools.com/tags/tag_button.asp&lt;button&gt; 说:

      重要:如果您在 HTML 表单中使用该元素,则不同 浏览器可能会提交不同的值。 Internet Explorer,以前的版本 9、会提交和标签之间的文字,而 其他浏览器会提交 value 属性的内容。使用 &lt;input&gt; 元素在 HTML 表单中创建按钮。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-05-08
        • 2019-11-15
        • 2011-01-14
        • 2013-12-17
        • 2013-02-19
        • 2020-07-22
        • 2014-02-08
        • 1970-01-01
        相关资源
        最近更新 更多