87,902
社区成员
发帖
与我相关
我的任务
分享
<table>
<tr>
<td>a</td> <td><a href=# onclick="show(this);">xx</a></td>
<td>b</td> <td><a href=# onclick="show(this);">xx</a></td>
<td>c</td> <td><a href=# onclick="show(this);">xx</a></td>
</tr>
</table>
<script type="text/javascript">
function show(a){
var td=a.parentNode,tr=td.parentNode;
alert(tr.cells[td.cellIndex-1].innerHTML)
}
</script>