<td><input id="chkall" type="checkbox" onclick="chkAll();" />全选/取消</td>
1 <script type="text/javascript">
2 функция chkAll()
3 {
4 //отладчик;
5 var chkall= document.all["chkall"];
6 var chkother= document.getElementsByTagName("input");
7 для (var i=0;i<chkother.length;i++)
8 {
9 if( chkother[i].type=='флажок')
10 {
11 if(chkother[i].id.indexOf('TreeView1')>-1)
12 {
13 if(chkall.checked==true)
14 {
15 chkother[i].checked=true;
16 }
еще 17
18 {
19 chkother[i].checked=false;
20 }
21 }
22 }
23 }
24 }
25 </script>