...
onclick - The onclick property is used when you wish to initiate a client-side script when the button widget is clicked.
Note: By default, a button's "onclick" event will take precedence over the "response" property. If both are defined, the "onclick" event will fire and control will not return to the server.
Alternative Button Widget Types
...