Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<script type="text/javascript">
/*<![CDATA[*/
function Check(cb){
var td=cb,table=cb,checked=cb.checked,index,rows,cells;
while (td.parentNode&&td.nodeName.toUpperCase()!='TD'){
td=td.parentNode;
}
index=td.cellIndex;
while (table.parentNode&&table.nodeName.toUpperCase()!='TABLE'){
table=table.parentNode;
}
rows=table.rows;
for (var z0=0;z0<rows.length;z0++){
cb=rows[z0].cells[index].getElementsByTagName('INPUT')[0];
if (cb){
cb.checked=checked;
}
}
}
/*]]>*/
</script></head>
<body>
<table border="1">
<tr>
<td><input type="checkbox" name="" onclick="Check(this);" /></td>
<td><input type="checkbox" name="" onclick="Check(this);" /></td>
</tr>
<tr>
<td><input type="checkbox" name="" onclick="Check(this);" /></td>
<td>''<td>
</tr>
<tr>
<td><input type="checkbox" name="" onclick="Check(this);" /></td>
<td><input type="checkbox" name="" onclick="Check(this);" /></td>
</tr>
</table>
</form>
</body>
</html>
Bookmarks