<table>
<tr>
    <td>
    <input type="checkbox" onClick="alert(this.parentNode.parentNode.rowIndex)"></td>
</tr>
</table>
rowIndex是行索引,它是相对于table的行数来讲的
rowIndex是tr的属性,而你用的this指的是checkbox