volendo puoi ottenere anche l'effetto contrario, ovvero se deselezioni una check si deselezionano tutte...
codice:
<html>
<head>
<script type="text/javascript">
function checkall() {
var thischeck = this;
inputtag = document.getElementsByTagName('input').length;
for (i=0; i<inputtag; i++) {
thisinput = document.getElementsByTagName('input')[i];
if (thisinput.getAttribute('type') == 'checkbox') {
thisinput.checked = !thischeck.checked;
}
}
thischeck.checked = !thischeck.checked;
}
</script>
</head>
<body>
<input type="checkbox" onclick="checkall()">
<input type="checkbox" onclick="checkall()">
<input type="checkbox" onclick="checkall()">
<input type="checkbox" onclick="checkall()">
<input type="checkbox" onclick="checkall()">
<input type="checkbox" onclick="checkall()">
</body>
</html>