Skip to content

Instantly share code, notes, and snippets.

@tessguefen
Forked from steveosoule/check-all-checkboxes.js
Created November 23, 2015 18:14
Show Gist options
  • Save tessguefen/dff038e73782d1903004 to your computer and use it in GitHub Desktop.
Save tessguefen/dff038e73782d1903004 to your computer and use it in GitHub Desktop.
Check all Checkboxes
(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = !inputs[i].checked;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i<w .frames.length;i++){var fr=w.frames[i];checkFrames(fr);}}}checkFrames(window);})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment