<form>
<input>
<button type="reset">Reset</button>
</form>
<p>Type something then click the 'Reset' button.</p>
In the above example we add the type
attribute to a button control.
type
AttributeThe type
attribute allows you to specify the type of button.
Possible values:
submit
reset
button
menu
menu
attribute (see above).<button>
ElementThe <button>
element creates a button control in an HTML document.
Any contents of the <button>
element appears on the button.
The <button>
element can be associated with a form or stand alone by itself (in such case it could have JavaScript attached via the onclick
attribute) to make the button actually do something.