Skip to content

Instantly share code, notes, and snippets.

@ebisawa
Created January 19, 2011 12:38
Show Gist options
  • Save ebisawa/786115 to your computer and use it in GitHub Desktop.
Save ebisawa/786115 to your computer and use it in GitHub Desktop.
checkall
<input type="checkbox" id="checkall" onchange="
for (i = 0; i < document.f.elements.length; i++) {
if (document.f.elements[i].name == 'selected[]') {
document.f.elements[i].checked = document.getElementById('checkall').checked;
}
}
">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment