What Is Onclick In HTML?

The onclick attribute is an event attribute supported by all browsers. It appears when a user clicks on a button element. If you want to make a button onclick, you need to add the onclick event attribute to the <button> element. The button onclick runs a script when a button is clicked.
 
Back
Top