- 按钮。该标签可以使用在
- 该标签优点就是自定义样式很方便。起始和结束标签之间可以有文字以及图片。
属性
- name属性
- value属性自定义数据name属性的值
- type属性
- 如果不写,并且在中,会默认增加submit值。也就是会被当做提交按钮。
- submit:用在中,但是最好使用。
- reset:重置控件的值。
- button:单纯的用作一个按钮,没有特殊的功能,但可以自定义。当你的
UA样式表
button {display: inline-block;letter-spacing: normal;word-spacing: normal;appearance: auto;-webkit-writing-mode: horizontal-tb !important;text-rendering: auto;color: -internal-light-dark(black, white);text-transform: none;text-indent: 0px;text-shadow: none;text-align: center;align-items: flex-start;cursor: default;background-color: -internal-light-dark(rgb(239, 239, 239), rgb(59, 59, 59));box-sizing: border-box;margin: 0em;font: 400 13.3333px Arial;padding: 1px 6px;border-width: 2px;border-style: outset;border-color: -internal-light-dark(rgb(118, 118, 118), rgb(133, 133, 133));border-image: initial;}
例子
<form action="#top" method="GET">
<label for="username">用户名:</label>
<input type="text" name='username'
value="" id="username" placeholder="邮箱/用户名/登录手机" required
autocomplete="email" tabindex="-1" />
<button type='reset'>reset</button>
<button type='submit'>submit</button>
</form>
<button type='botton'>botton</button>
输出结果
