Created
August 1, 2018 20:00
-
-
Save bobvanluijt/4f766bfaa86a3eee0ce10caded2e7277 to your computer and use it in GitHub Desktop.
check all checkboxes in DOM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var checkboxes = document.getElementsByTagName("*"); | |
for (var i=0, max=checkboxes.length; i < max; 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