Syntax
onClick="command"
The onClick event handler is defined in an tag and specifies what to do when the button is clicked.
<html> <form name="myForm"> <input type="button" value="Big Button" name="myButton" onClick="alert('Click event occurred')"> </form> </html>