inserisci l'evento onclick sulla checkbox chiave


codice:
<input type="checkbox" onclick="checkall()">
poi metti questa funzione nell'header

codice:
<script type="text/javascript">
function checkall() {
  inputtag = document.getElementsByTagName('input').length();
  for (i=0; i<inputtag; i++) {
     thisinput = document.getElementsByTagName('input')[i];
    
     if (thisinput.getAttribute('type') == 'checkbox') {
        thisinput.checked = true;
     }
  }

}
<script>
Non l'ho provata... a te il compito di testarla.