Jquery Code for Button Click - Jquery

How to handle button click events in jQuery?

Snippet Code


  
Rate this page :
  [ 0 votes]

The below code helps you to handle button click events using Jquery code. You have to put the event handler in the $(document).ready() function.

<script type='text/javascript'> $(document).ready(function() { $("#btnclick").click( function(){ alert('Button Clicked!!'); }); }); </script> <input type='button' id='btnclick' value='click'>

Tags


Ask Questions

Ask Question