Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"> </script> <script> $(document).ready(function () { $(':button').click(function (eventObj) { alert(this.value + ' ' + this.type + ' clicked'); }); }); </script> </head> <body> <h1>Demo: jQuery click() method </h1> <input type="button" value="Save" id="saveBtn" /> <input type="button" value="Delete" id="delBtn" /> <input type="button" value="Clear" id="clearBtn" /> </body> </html>
Result: