Jquery “select all” checkbox

后端 未结 11 658
执念已碎
执念已碎 2020-12-06 05:45

I am trying to select all checkboxes on a page once the \'select all\' checkbox is clicked and i am using jquery for this as you can see at the below link:

http://js

11条回答
  •  醉话见心
    2020-12-06 06:06

    $(document).ready(function () {
        $('#selectall').click(function () {
            $('.selectedId').prop('checked', $(this).is(":checked"));
        });
    });
    
    more Optimized
    

提交回复
热议问题