Created
January 18, 2013 18:31
-
-
Save DmitrySandalov/4566998 to your computer and use it in GitHub Desktop.
JavaScript 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
function check_all_in_document(doc) | |
{ | |
var c = new Array(); | |
c = doc.getElementsByTagName('input'); | |
for (var i = 0; i < c.length; i++) | |
{ | |
if (c[i].type == 'checkbox') | |
{ | |
c[i].checked = true; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment