pakai jquery seperti:
<input type="checkbox" value="1,2,3,4" onclick="checkRelated(this)"> Test
<input type="checkbox" value="1"/>1
<input type="checkbox" value="1"/>2
<input type="checkbox" value="1"/>3
<input type="checkbox" value="1"/>4
<input type="checkbox" value="1"/>5
<script type="text/javascript">
function checkRelated(check) {
if (!check.checked) {
return;
}
var checkboxes = $(check).val().split(',');
for (var i in checkboxes) {
$('input[type="checkbox"][value="'+checkboxex[i]+'"]').setAttr('checked','checked');
}
}
</script>