Last active
July 30, 2020 03:07
-
-
Save rspurrell/33a459882d9904cc83a7a3339c5d6cca to your computer and use it in GitHub Desktop.
Check all checkboxes
This file contains 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 inputs = document.getElementsByTagName("input"); | |
for (let i = 0; i < inputs.length; i++) { | |
let e = inputs[i]; | |
if (e.type == "checkbox" && !e.checked) { | |
e.checked = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment