The example in this article describes the implementation of js select all and the method of determining whether a check box is selected. Share it with everyone for your reference. The specific implementation method is as follows:
var state = allobj.checked;
If(items.length){
for(var i=0;i
}else{
If(!items[i].disabled) items.checked=state;
}
/*
* Determine whether the record is selected
*/
function validateIsSelect(allobj,items){
var state = allobj.checked;
If(items.length){
for(var i=0;i
}else{
If(items.checked) return true;
return false;
}