HTML 标签 <button>
button:定义一个按钮。
在 button 元素内部,您可以放置内容,比如文本或图像。这是该元素与使用 input 元素创建的按钮之间的不同之处。
提示:请始终为 button 元素规定 type 属性。不同的浏览器对 button 元素的 type 属性使用不同的默认值。
属性
autofocus:自动地获得焦点
disabled:禁用
form:按钮属于一个或多个表单。
formaction:当提交表单时向何处发送表单数据。覆盖 form 元素的 action 属性。该属性与 type="submit" 配合使用。
formenctype:规定在向服务器发送表单数据之前如何对其进行编码。覆盖 form 元素的 enctype 属性。该属性与 type="submit" 配合使用。包括:application/x-www-form-urlencoded(默认)、multipart/form-data(文件)、text/plain
formmethod:规定用于发送表单数据的 HTTP 方法。覆盖 form 元素的 method 属性。该属性与 type="submit" 配合使用。
formnovalidate:如果使用该属性,则提交表单时不进行验证。覆盖 form 元素的 novalidate 属性。该属性与 type="submit" 配合使用。
formtarget:规定在何处打开 action URL。覆盖 form 元素的 target 属性。该属性与 type="submit" 配合使用。包括:_blank、_self、_parent、_top、framename
name:名称
type:类型,包括button、submit、reset
value:初始值