87,907
社区成员
发帖
与我相关
我的任务
分享
<table border=1 id="tb">
<tr>
<td onclick="alert(this.parentElement.rowIndex)"> <input type=button value='click'
onclick="this.parentElement.parentElement.rowIndex"> </td>
</tr>
</table>
<table border=1 id="tb">
<tr>
<td>
<table border=1 id="hehe">
<tr>
<td>
<input type=button value='click' onclick="alert(document.getElementById('hehe').parentNode.parentNode.rowIndex)">
</td>
</tr>
</table>
</td>
</tr>
</table>