1// Check
2document.getElementById("checkbox").checked = true;
3
4// Uncheck
5document.getElementById("checkbox").checked = false;
1<script type="text/javascript">
2 function selectAll() {
3 var items = document.getElementsByName('acs');
4 for (var i = 0; i < items.length; i++) {
5 if (items[i].type == 'checkbox')
6 items[i].checked = true;
7 }
8 }
9
10 function UnSelectAll() {
11 var items = document.getElementsByName('acs');
12 for (var i = 0; i < items.length; i++) {
13 if (items[i].type == 'checkbox')
14 items[i].checked = false;
15 }
16 }
17</script>
18