JQuery - Call the jquery button click event based on name property

后端 未结 4 2151
天涯浪人
天涯浪人 2021-02-13 09:46

I have one HTML button like,


         


        
4条回答
  •  不思量自难忘°
    2021-02-13 10:37

    You can use normal CSS selectors to select an element by name using jquery. Like this:

    Button Code
    
    
    Selector & Event Bind Code
    $("button[name='mybutton']").click(function() {});
    

提交回复
热议问题