Posted By

deftonez4me on 08/04/09


Tagged

javascript


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Unreal
tautvys92
jillella


Javascript - Check All/Uncheck All checkbox function


 / Published in: JavaScript
 

  1. function check() {
  2. var checks = document.getElementById('checkboxes').getElementsByTagName('input');
  3. var status = (document.getElementById('checkall').checked == 1) ? true : false;
  4. for(var x = 0; x < checks.length; x++) {
  5. checks[x].checked = status;
  6. }
  7. }

Report this snippet  

You need to login to post a comment.