87,910
社区成员
发帖
与我相关
我的任务
分享
<script>
function getCurRowNum(elm)
{
alert('current row num is: '+elm.parentNode.parentNode.rowIndex);
}
</script>
<table border="1">
<tr><td><input type="button" onclick="getCurRowNum(this)" value='test' /></td></tr>
<tr><td><input type="button" onclick="getCurRowNum(this)" value='test' /></td></tr>
<tr><td><input type="button" onclick="getCurRowNum(this)" value='test' /></td></tr>
</table>