Skip to content

Instantly share code, notes, and snippets.

@rotten77
Created May 2, 2013 07:54
Show Gist options
  • Save rotten77/5500781 to your computer and use it in GitHub Desktop.
Save rotten77/5500781 to your computer and use it in GitHub Desktop.
Check all checkboxes
var checkboxes = new Array();
checkboxes = document.getElementsByTagName('input');
for (var i=0; i<checkboxes.length; i++) {
if (checkboxes[i].type == 'checkbox') {
checkboxes[i].checked = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment