How to Handle Button Click Events in jQuery? -
i need have button , handle event in jquery. , writing code it'snot working. did miss something?
<!-- begin button --> <div class="demo"> <br> <br> <br> <input id = "btnsubmit" type="submit" value="release"/> <br> <br> <br> </div> <!-- end button -->
and in javascript file
function btnclick() { // button click $("#btnsubmit").button().click(function(){ alert("button"); }); }
you have put event handler in $(document).ready() event:
$(document).ready(function() { $("#btnsubmit").click(function(){ alert("button"); }); });
Comments
Post a Comment