An <button> tag with a type="button"
attribute creates a clickable button.
These buttons are commonly used to execute JavaScript.
A <button> element of type button.
Clicking the button displays an alert box.
<button type="button"
onclick="alert('Calculations have been started!')">Start calculation</button>
The <button type="button">
tag creates a clickable button.
Buttons of this type are mostly used to execute JavaScript functions.
The button can contain text, images, icons, and other elements.
<button type="button">...</button>
Here is when type="button"
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <button>