Select All checkboxes using jQuery

前端 未结 15 1654
渐次进展
渐次进展 2020-12-05 06:26

I have the following html code:

    
    

15条回答
  •  孤街浪徒
    2020-12-05 07:10

    Try this

    $(document).ready(function () {
        $("#ckbCheckAll").click(function () {
            $("#checkBoxes input").prop('checked', $(this).prop('checked'));
        });
    });
    

    That should do it :)

提交回复
热议问题