<script language="javascript">
function selcheck() {
var objs = myTable.getElementsByTagName("input");
for(var i=0; i<objs.length; i++) {
if(objs[i].type.toLowerCase() == "checkbox" )
objs[i].checked = true;
}
}
</script>
使用方法:
1. 在<head></head>内插入如上JS代码
2. 设置checkbox,例如
<table>
伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-08/1187526584.html
<TR>
控制CheckBox全选的JS
'http://www.etoow.com/html/2007-08/1187526584.html