The onclick event
The onclick
event is fired when a pointing device button (usually a mouse button) is pressed and released on a single element:
<button onclick="callFunction()">Click</button> <script> function callFunction() { alert("Button Clicked"); } </script>