checkbox全选优秀代码
2016-06-24来源:

<script language=javascript>

function selectall() //全选

{

var arrobj = document.all;

for(var i = 0; i < arrobj.length;i++)

{

if(typeof arrobj[i].type != undefined && arrobj[i].type=='checkbox') arrobj[i].checked =true;

}

}

function unselectall() //全不选

{

var arrobj = document.all;

for(var i = 0; i < arrobj.length;i++)

{

if(typeof arrobj[i].type != undefined && arrobj[i].type=='checkbox') arrobj[i].checked =false;

}

}

</script>

推荐信息
Baidu
map