<td><input id="chkall" type="casilla de verificación" onclick="chkAll();" />全选/取消</td>
1 <tipo de script="texto/javascript">
2 funciones chkAll()
3 {
4 //depurador;
5 var chkall= documento.all["chkall"];
6 var chkother= document.getElementsByTagName("entrada");
7 para (var i=0;i<chkother.length;i++)
8 {
9 si (chkother[i].type=='casilla de verificación')
10 {
11 si(chkother[i].id.indexOf('TreeView1')>-1)
12 {
13 si (chkall.comprobado == verdadero)
14 {
15 chkother[i].checked=true;
16 }
17 más
18 {
19 chkother[i].checked=false;
20 }
21 }
22 }
23 }
24 }
25 </script>