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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -