I\'m really bad at Javascript and I\'m struggling to get my head round it.
What I\'m trying to do is get something to select all checkboxes. However everything I have fo
var array = document.getElementsByTagName("input");
for(var ii = 0; ii < array.length; ii++)
{
if(array[ii].type == "checkbox")
{
if(array[ii].className == YOUR_CLASS_NAME)
{
array[ii].checked = true;
}
}
}
by ID:
var checkbox = document.getElementById(YOUR_ID);
if(null != checkbox)
checkbox.checked = true;