<form name="testform" onclick="test()">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="submit">
</form><script>
function test()
{
var checked = false ;
with(event.srcElement)
if(checked==true)
for(i=0; i<parentElement.children.length; i++)
if(parentElement.children[i].type=="checkbox")
parentElement.children[i].checked = true ;
}
</script>
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="submit">
</form><script>
function test()
{
var checked = false ;
with(event.srcElement)
if(checked==true)
for(i=0; i<parentElement.children.length; i++)
if(parentElement.children[i].type=="checkbox")
parentElement.children[i].checked = true ;
}
</script>
<!--
function fnccheck(o1)
{
if(o1.checked)
{
var o2 = document.getElementsByTagName('INPUT')
for(var i=0;i<o2.length;i++)
{
if(o2[i].type == 'checkbox') o2[i].checked = true;
}
}
}
//-->
</script><input type=checkbox onclick='fnccheck(this);'>
<input type=checkbox onclick='fnccheck(this);'>
<input type=checkbox onclick='fnccheck(this);'>
<head>
<script language="vbscript">
sub button1_onclick
for each i in form1
i.checked=not i.checked
next
end sub
</script>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<form name="form1">
<input type="checkbox" >
<input type="checkbox" >
<input type="checkbox" >
<input type="button" name="button1" value="click">
</form>
</body>
</html>
<input type="checkbox" onclick="selectAll()"....
function selectAll(){
chkboxa.checked=true;
chkboxb.checked=true;
chkboxc.checked=true;
....
}