先弹的是行号,后面是列号
<table border="1">
<tr>
<td onclick="alert(this.parentNode.rowIndex+parseInt(1));alert(this.cellIndex+parseInt(1));">测试1
</td>
<td onclick="alert(this.parentNode.rowIndex+parseInt(1));alert(this.cellIndex+parseInt(1));">测试2
</td>
</tr>
<tr>
<td onclick="alert(this.parentNode.rowIndex+parseInt(1));alert(this.cellIndex+parseInt(1));">测试3
</td>
<td onclick="alert(this.parentNode.rowIndex+parseInt(1));alert(this.cellIndex+parseInt(1));">测试4
</td>
</tr>
</table>