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

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

I have one HTML button like,


         


        
4条回答
  •  灰色年华
    2021-02-13 10:21

    You have to use the jquery attribute selector. You can read more here:

    http://api.jquery.com/attribute-equals-selector/

    In your case it should be:

    $('input[name="btnName"]')
    

提交回复
热议问题