Select all checkbox elements except disabled ones

后端 未结 8 469
暗喜
暗喜 2021-01-18 09:06

I want to select all checkbox elements expect disabled ones,

this is my html



        
8条回答
  •  迷失自我
    2021-01-18 09:29

    Check all except disable

    $('input:checkbox:not(:disabled)').attr('checked', 'checked');
    

    Uncheck all except disable

    $('input:checkbox:not(:disabled)').removeAttr('checked');
    

    refer below link for more details http://www.infinetsoft.com/Post/How-to-check-all-except-disabled/18#.V00SYfl97IU

提交回复
热议问题