Entry
How to make a check box check or uncheck a group of checkboxes on a form?
Jan 18th, 2002 13:19
Arsen Yeremin, Matt Ruby,
<html>
<head>
<title>Check All</title>
<script>
function DoToAll(obj_input)
{ bol_is_checked = (obj_input.checked)?true:false
for (x=0;x<obj_input.form.length;x++)
{ obj_input.form.elements[x].checked = bol_is_checked;
}
}
</script>
</head>
<body>
<form>
all:
<input type="checkbox" onclick="DoToAll(this)"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
<input type="checkbox"><br>
</form>
</body>
</html>