<button onClick=””>
- Attribute of
- How To Use The HTML Tag
- What does
<button onClick="">
do? - Runs a script when a button is clicked.
The onClick
attribute is an event handler that instructs the browser to run a script when the visitor clicks a button.
Example usage
<button onClick="script">

Browser Support for onClick
![]() ![]() | ![]() ![]() | ![]() ![]() | ![]() ![]() | ![]() ![]() | ![]() ![]() |
All | All | All | All | All | All |