<table cellpadding="0" cellspacing="0" width="400">
<tr>
<td width="100" height="24" align="center">
<input type="checkbox" name="checkbox1" onClick="test1(this)">
</td>
<td width="100" height="24" align="center">  : </td>
<td width="100" height="24" align="center">  : </td>
<td width="100" height="24" align="center">  : </td>
</tr>
</table> <script language="JavaScript">
function test1(obj){
if(obj.checked == true){//选中复选框
obj.parentNode.parentNode.style.backgroundColor='#ccccff';
}else{//未选中或取消选中
obj.parentNode.parentNode.style.backgroundColor='#FFFFFF';
}
return false;
}
<tr>
<td width="100" height="24" align="center">
<input type="checkbox" name="checkbox1" onClick="test1(this)">
</td>
<td width="100" height="24" align="center">  : </td>
<td width="100" height="24" align="center">  : </td>
<td width="100" height="24" align="center">  : </td>
</tr>
</table> <script language="JavaScript">
function test1(obj){
if(obj.checked == true){//选中复选框
obj.parentNode.parentNode.style.backgroundColor='#ccccff';
}else{//未选中或取消选中
obj.parentNode.parentNode.style.backgroundColor='#FFFFFF';
}
return false;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货