jQuery disable all button of a css class

后端 未结 4 709
暖寄归人
暖寄归人 2021-01-04 05:36

I have n buttons. This button has the same name: setAlg.

I would disable all the buttons that has this name.

I have tried

$(\"input[name=         


        
4条回答
  •  再見小時候
    2021-01-04 06:38

    I think you forgot quotes

    $("input[name='setAlg']").attr('disabled','true');
    

    If this doesn't work then maybe your selection doesn't work

提交回复
热议问题