日期:2014-05-16 浏览次数:20351 次
<form id="form1" name="form1" method="post" action="">
<table width="600" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>id</td>
<td>dz</td>
<td> </td>
</tr>
<tr>
<td><label>
<input type="checkbox" name="id" id="id" onclick="qx2()" class="bb2" />
</label></td>
<td><label>
<input type="checkbox" name="dz" id="dz" class="bb3" />
</label></td>
<td> </td>
</tr>
<tr>
<td><label>
<input type="checkbox" name="id" id="id" onclick="qx2()" class="bb2" />
</label></td>
<td><label>
<input type="checkbox" name="dz" id="dz" class="bb3" />
</label></td>
<td> </td>
</tr>
</table>
</form>
function qx2(ob)
{
//console.log($(ob).parents("tr").find("input.bb3"))
var other = $(ob).parents("tr").find("input.bb3");
$(other).prop("checked" ,$(ob).prop("checked"));
}
var tds = btn.parentElement.