Skip to content

Instantly share code, notes, and snippets.

@jacobkahn
Created April 8, 2016 01:49
Show Gist options
  • Save jacobkahn/771acabf5cfc7724dd34d5ef0992534d to your computer and use it in GitHub Desktop.
Save jacobkahn/771acabf5cfc7724dd34d5ef0992534d to your computer and use it in GitHub Desktop.
Check all checkboxes on a page with Javascript
(function() {
var aa = document.querySelectorAll("input[type=checkbox]");
for (var i = 0; i < aa.length; i++){
aa[i].checked = true;
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment