Why is my jQuery button handler not being fired?

前端 未结 5 1292
独厮守ぢ
独厮守ぢ 2020-12-22 13:32

I have this jQuery to respond to a button being clicked and call a REST method:

$(document).ready(function() {
    $(\"#btnGetData\").click(function() {
             


        
5条回答
  •  伪装坚强ぢ
    2020-12-22 14:07

    Add button type like this if you are submitting a form:

    
    

    UPDATE

    From your "Update 2" change first line this :

    
    

    to this:

    
    

    we do not need to check integrity of jquery file here so by removing that you will be able to run jquery without any errors. Thanks

提交回复
热议问题