jQuery获取到一个table表格中被单选框选中的行的其他列的值?怎么做?上代码!

如题所述

比如

<table>
<tr>
  <td><input type="checkbox" checked/></td>
  <td>1</td>
</tr>
</table>

可以用以下代码获取到 1

$(function(){
  $("input:checked").parents('tr').find('td').eq(1).text();
})

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答