Last active
August 12, 2016 16:07
-
-
Save bencooper222/da1fc5c51901bfb72c3f2015d67f528c to your computer and use it in GitHub Desktop.
Selects all messages on Squirrelmail to allow for easy deleting on servers that have quotas (was designed to work with the student and alumni squirrelmail at IMSA)
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"); | |
var checkboxes = []; | |
for (var i = 0; i < inputs.length; i++) { | |
if (inputs[i].type == "checkbox") { | |
checkboxes[checkboxes.length] = inputs[i]; | |
} | |
} | |
for (var j = 0; j < checkboxes.length / 2; j++) { | |
checkboxes[j].checked = true; | |
} | |
console.log(checkboxes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Accidentally used the
=
assigning operator instead of the==
operator the first time around.