<form action="" method="post" name="form1">
<script type="text/javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.Name != "chkAll"&&e.disabled!=true)
e.checked = form.chkAll.checked;
}
}
</script>
<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">选中/取消所有
<p><input name="checkbox[]" type="checkbox" value="checkbox1">&nbsp;checkbox1
<p><input name="checkbox[]" type="checkbox" value="checkbox2">&nbsp;checkbox2
<p><input name="checkbox[]" type="checkbox" value="checkbox3">&nbsp;checkbox3
<p><input name="checkbox[]" type="checkbox" value="checkbox4">&nbsp;checkbox4
<p><input name="submit" type="submit" value="提交">
</form>
posted on 2010-08-11 15:58  吴勇寿  阅读(284)  评论(0编辑  收藏  举报