HTML <button> element
<button>
tag defines a button.
<input type="button" style="width:100px;height:24px;font-size:15px" value="Test Button">
Add an event to the button handled by javascript, when clicked, pop up a new window:
<input type="button" style="width:100px;height:24px;font-size:15px" onClick='var w = window.open("","","width=500, height=80"); w.document.write("HTML Tutorial");' value="Open window">
Specific attributes of <button> tag:
Attribute | Description |
autofocus | Automatically focus on the button when page loads. HTML5 only. |
disabled | Button unclickable |
name | Button name |
type | Type of the button, including submit, reset and button. |
value | Button value |