如何实现此功能
<script language="javascript">
function checkall(form)
{
for (var i = 0;i<form.elements.length;i++)
{
var e = form.elements[i];
e.checked = "checked" ;
}
}
</script>
<form id="form1" name="form1" method="post" action="untitled.asp">
<label>
<input name="che" type="checkbox" id="che" value="checkbox" />
a
</label>
<label>
<input name="che" type="checkbox" id="che" value="checkbox" />
</label>
<label>
b
<input name="che" type="checkbox" id="che" value="checkbox" />
</label>
<label>
c </label>
<label>
<input type="button" name="Submit" value="全选" onclick="checkall(this.form)" />
</label>
</form>