Skip to content

Instantly share code, notes, and snippets.

@SAFAD
Created July 27, 2014 13:15
Show Gist options
  • Save SAFAD/0a6a5511aab7979b9c4a to your computer and use it in GitHub Desktop.
Save SAFAD/0a6a5511aab7979b9c4a to your computer and use it in GitHub Desktop.
check all checkboxes
var cbs = document.getElementsByTagName('input'); for(var i=0; i < cbs.length; i++) { if(cbs[i].type == 'checkbox') { cbs[i].checked = true; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment