function selectedAll(allselect, obj) {
            $("#"+obj.id+" input:checkbox").each(function () {
                if (allselect.checked)
                    $(this).attr("checked", true);
                else {
                    $(this).attr("checked", false);
                }
            });
        }

调用

<input id="allCheck" onclick="selectedAll(this, document.getElementById('cbl_cg'))" type="checkbox" name="allCheck" />全选/反选

 

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-15
  • 2021-12-02
  • 2022-12-23
猜你喜欢
  • 2022-03-04
  • 2021-08-02
  • 2021-09-24
  • 2021-07-20
  • 2022-01-14
相关资源
相似解决方案