This would be an example of the full script:
Code:
<html>
<head>
<script type="text/javascript">
var boxes = new Array("a1","a2","a3","a4","a5","a6")
function checkall() {
for (i=0;i<=boxes.length-1;i++) {
var allboxes = document.getElementById(boxes[i])
if (allboxes.checked==false) {allboxes.checked=true}
else {allboxes.checked=false}
}
}
</script>
</head>
<body>
<input type="button" value="Check/Uncheck All" onclick="checkall()">
<br><input type="checkbox" id="a1">Student 1
<br><input type="checkbox" id="a2">Student 2
<br><input type="checkbox" id="a3">Student 3
<br><input type="checkbox" id="a4">Student 4
<br><input type="checkbox" id="a5">Student 5
<br><input type="checkbox" id="a6">Student 6
</body>
</html>
Bookmarks