Check all other checkboxes when one is checked

后端 未结 10 809
感情败类
感情败类 2020-12-09 23:11

I have a form and group of checkboxes in it. (These checkboxes are dynamically created but I dont think it is important for this question). The code that generates them look

10条回答
  •  臣服心动
    2020-12-09 23:40

    use this i hope to help you i know that this is a late answer but if any one come here again

    $("#all").change(function () {
            $("input:checkbox").prop('checked', $(this).prop("checked"));
        });
    

提交回复
热议问题