<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
</table>
1 个解决方案
#1
<table>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
</table>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$(".add").click(function(event){
alert($(this).closest("tr").find(".check").prop("checked"));
});
});
</script>
#1
<table>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
<tr>
<td><input type="checkbox" class="check"></td>
<td><input type="button" class="add"></td>
</tr>
</table>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$(".add").click(function(event){
alert($(this).closest("tr").find(".check").prop("checked"));
});
});
</script>