求教,想根據選中的radio來獲取該radio所在那一行裡面的所有的td值(每個td裡面的值要分別獲取出來)
該怎麼做呢?
<c:forEach items="${logoutAccountForm.accountList}"
var="logoutList">
<tr height="55" class="table_centent_bj_color_b" >
<td width="100" class=""><span class="radio_wrap">
<input type="radio" id="xh" name="xh" value="" /> <label
for="xh" class="check"></label>
</span></td>
<td width="350" class="" id="accNo"><p>${logoutList.accNo}
</p></td>
<td width="200" class="" id="custName"><p>${logoutList.customer.custName}
</p></td>
<td width="300" class="" id="openBank"><p>${logoutList.openbank}
</p></td>
<td width="250" class="" id="openDate"><p>${logoutList.openDate}
</p></td>
</tr>
</c:forEach>
通多dom關系來獲取
$('input[name="xh"]:checked').each(function () {
var tr = $(this).closest('tr'), tds = tr.find('td');
alert(tds.eq(1).text())
alert(tds.eq(2).text())
alert(tds.eq(4).text())
//.....
});