<table class="table">
<tr>
<td><input type="checkbox" checked=“”checked“”></td>
<td>测试</td>
</tr>
</table>
使得已勾选上的行去掉勾选:
$(".table input[type=checkbox]").attr("checked",false);
或
$(".table input:checkbox").attr("checked",false);
循环遍历获取选中行所在的行数及其下一个兄弟节点的值:
$("table input:checkbox").each(function(){ if($(this).attr("checked")==true){ alert($("table input:checkbox").index(this))//值
console.log($(this).parent().parent().children().eq(1).text()); } })