全选<input type="checkbox" name="select" id="select" value="checkbox" onclick="selectAllCheckBox(this);" />
<input type='checkbox' name='id' value='"+list[i].id+"'/>
var arr = $("input[type='checkbox'][name='id']:checked");
var ids = "";
$.each(arr,function(index,o){
    ids = ids + $(o).val()+",";
});
ids = ids.substring(0,ids.length-1);
function selectAllCheckBox(o){
  var arr = $("input[name='id']");
  $.each(arr, function(index, current) {
      current.checked = o.checked;
  });
}

 

相关文章:

  • 2021-10-18
  • 2021-12-09
  • 2021-12-09
  • 2021-08-14
  • 2021-12-09
  • 2021-12-09
  • 2021-08-14
  • 2021-12-09
猜你喜欢
  • 2021-11-07
  • 2021-12-09
  • 2022-01-02
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
  • 2021-12-19
相关资源
相似解决方案