<script>
// 全选
function allCheck()
{
for (var i=0;i<aspnetForm.elements.length;i++)
{
var e=aspnetForm.elements[i];
if (e.type=='checkbox')
e.checked=true;
e.text ="全选";
}
}
//反选
function revCheck()
{
for (var i=0;i<aspnetForm.elements.length;i++)
{
var e=aspnetForm.elements[i];
if (e.type=='checkbox')
e.checked= false;
e.text ="取消";
}
}
function CheckBoxSelect()
{
var cb=document.getElementById("cbAll");
if(cb.checked)
{
allCheck();
}
else
{
revCheck();
}
}
</script>