jQuery disable all button of a css class

后端 未结 4 708
暖寄归人
暖寄归人 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:25

    You can disable a button by using below mentioned steps.

    Say your button class name = setAlg

    Step 1:

    Using Jquery attr Attribute :

    $('.setAlg').attr('disabled', 'disabled');
    

    Step 2:

    Using Jquery addClass CSS Class :

    $('.setAlg').addClass('disabled');
    

    Step 3 :

    Then by Declaring CSS Style Class :

     
    

提交回复
热议问题