<th class= "Wp7_5" ><input type= "checkbox" id= "Checkallid" onclick= "Checkall (this);" class= "VM/> Select all </ Th>
<div>
<td><input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat (']. Checkarray ')} "onclick=" Check (); " /></td>
<input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat ('].checkarray ')}" onclick= "Check ();" />1</td>
<input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat ('].checkarray ')}" onclick= "Check ();" />2</td>
<input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat ('].checkarray ')}" onclick= "Check ();" />3</td>
<input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat ('].checkarray ')}" onclick= "Check ();" />4</td>
<input type= "checkbox" Th:name= "${#strings. Concat (' listbean['). Concat (Status.index). Concat ('].checkarray ')}" onclick= "Check ();" />5</td></div>
Javascript
function Checkall (obj) {
var el = document.getelementsbytagname (' input ');
if (obj.checked = = True) {
for (var key in El) {
if (el[key].type = = ' checkbox ') {
el[key].checked = true;
}
}
} else {
for (var key in El) {
if (el[key].type = = ' checkbox ') {
el[key].checked = false;
}
}
}
}
function Check () {
var el = document.getelementsbytagname (' input ');
var allcheckflag = true;
for (var key in El) {
if (el[key].type = = ' checkbox ') {
if (el[key].id! = "Checkallid") {
if (el[key].checked = = False) {
Allcheckflag = false;
}
}
}
}
}
</script>
Select and delete all the selected items, click the Select All, click on the two to cancel the full selection