/*全选*/
function chAll(name)
{
var len = document.getElementsByName(name).length;
for(var i=0; i < len; i++)
{
document.getElementsByName(name)[i].checked = true;
}
}
//全不选
function unchAll(name)
{
var len = document.getElementsByName(name).length;
for(var i=0; i < len; i++)
{
document.getElementsByName(name)[i].checked = false;
}
}
//选中的值
function chValue(name)
{
var arr = new Array();
var obj = document.getElementsByName(name);
var len = obj.length;
for(var i=0; i < len; i++)
{
if(obj[i].checked == true)
{
arr.push(obj[i].value);
}
}
var val = arr.join(',');
alert(val);
}