1.偷懒的方法:)
<table id="_ctl2_cblAction" border="0" style="width:277px;">
<tr>
<td><input id="_ctl2_cblAction_0" type="checkbox" name="_ctl2:cblAction:0" /><label for="_ctl2_cblAction_0">北京</label></td>
</tr>
<tr>
<td><input id="_ctl2_cblAction_1" type="checkbox" name="_ctl2:cblAction:1" /><label for="_ctl2_cblAction_1">天津</label></td>
</tr><tr>
<td><input id="_ctl2_cblAction_2" type="checkbox" name="_ctl2:cblAction:2" /><label for="_ctl2_cblAction_2">山西</label></td>
</tr>
</table>
<button onclick="getValue()">goooo</button>
<script language="JavaScript">
<!--
function getValue()
{
var obj = document.getElementsByTagName("input");
var str = "";
for(var i=0;i<obj.length;i++)
{
if(obj[i].type == "checkbox" && obj[i].checked == true)
str += obj[i].parentElement.innerText+",";
}
alert(str);
}
//-->
</script>
<table id="_ctl2_cblAction" border="0" style="width:277px;">
<tr>
<td><input id="_ctl2_cblAction_0" type="checkbox" name="_ctl2:cblAction:0" /><label for="_ctl2_cblAction_0">北京</label></td>
</tr>
<tr>
<td><input id="_ctl2_cblAction_1" type="checkbox" name="_ctl2:cblAction:1" /><label for="_ctl2_cblAction_1">天津</label></td>
</tr><tr>
<td><input id="_ctl2_cblAction_2" type="checkbox" name="_ctl2:cblAction:2" /><label for="_ctl2_cblAction_2">山西</label></td>
</tr>
</table>
<button onclick="getValue()">goooo</button>
<script language="JavaScript">
<!--
function getValue()
{
var obj = document.getElementsByTagName("input");
var str = "";
for(var i=0;i<obj.length;i++)
{
if(obj[i].type == "checkbox" && obj[i].checked == true)
str += obj[i].parentElement.innerText+",";
}
alert(str);
}
//-->
</script>
str += obj[i].innerText+",";