:난의 난이 테이블이 있다고 가정 해 봅시다 셀의 텍스트를 기반으로 <code>td:nth-child</code>의 수를 얻기 위해 노력하고 있어요
<table class="table" id="inputTable">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><span>mike</span></td>
</tr>
<tr>
<td>2</td>
<td><span>eric</span></td>
</tr>
<tr>
<td>3</td>
<td><span>jonas</span></td>
</tr>
</tbody>
</table>
을
메신저 필터 메서드를 사용하여 jonas
과 같은 셀 텍스트를 찾을 때 td:nth-child
의 값을 알고 싶습니다. jquery를 사용하는 것이 가능합니까?
n 번째는 td의 마지막 아이를 묻는 중입니다. –
tr에있는 요소의 색인 또는 그 td가있는 tr의 색인을 요소로 원합니다. –
@MilindAnantwar td로 – Valkyrie