<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Untitled Document </title>
<script language= "JavaScript" >
function SelectAll (o)
{
var a = Document.getelementsbyname ("M");
for (Var i=0;i<a.length;i++) {
a[i].checked = o.checked;
}
}
function Checkone (obj) {
if (!obj.checked) {
document.getElementById ("All"). checked = obj.checked;
}
var B = true;
var arr = document.getelementsbyname (obj.name);
for (Var i=0;i<arr.length;i++) {
if (!arr[i].checked) {b=false; break;}
}
document.getElementById ("All"). checked = b;
}
</script>
<body>
<table>
<tr>
<td> Select <input type= "checkbox" id= "All" onclick= "SelectAll (This)"/></td>
</tr>
<tr>
<td><input type= "checkbox" Name= "M" onclick= "Checkone (This)"/></td>
</tr>
<tr>
<td><input type= "checkbox" Name= "M" onclick= "Checkone (This)"/></td>
</tr>
<tr>
<td><input type= "checkbox" Name= "M" onclick= "Checkone (This)"/></td>
</tr>
<tr>
<td><input type= "checkbox" Name= "M" onclick= "Checkone (This)"/></td>
</tr>
<tr>
<td><input type= "checkbox" Name= "M"/></td>
</tr>
</table>
<a href= "Javascript:selectone ()" >asdadasdd</a>
</body>
JS implementation check box Select all unselected and sub-check box to drive the selection of all marquee