Select all checkbox elements except disabled ones

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

I want to select all checkbox elements expect disabled ones,

this is my html



        
8条回答
  •  后悔当初
    2021-01-18 09:42

        $('#chkSelectAll').click(function () {
            var checked_status = this.checked;
            //   alert(checked_status);
            $('div#item input[type=checkbox]').each(function () {
                 if(!$(this).is(':disabled'){
                     this.checked = checked_status;
                 }
    
            });
        })
    

提交回复
热议问题