87,903
社区成员
发帖
与我相关
我的任务
分享
<scripttype="text/javascript">
function dd(e){
var td= e.parentNode;
var tr= td.parentNode;
var nRow, nCell;
if (/td/i.test(td.tagName)) nCell= td.cellIndex;
//if (/td/i.test(tr.tagName)) nRow= tr.rowIndex;
if (/tr/i.test(tr.tagName)) nRow= tr.rowIndex;
alert(nRow+"-"+ nCell);
}
</script>
<script type="text/javascript">
function dd(e){
var td = e.parentNode;
var tr = td.parentNode;
var nRow, nCell;
if (/td/i.test(td.tagName)) nCell = td.cellIndex;
if (/td/i.test(tr.tagName)) nRow = tr.rowIndex;
alert(nRow + "-" + nCell);
}
</script>
<table width="758" height="243" border="2" id=tb2>
<tr>
<td width="65" height="78"> <img src="file:///F|/fs_sbwh/images/bjb.jpg" width="64" height="57" onclick="dd(this)"> </td>
<td width="74"> <img src="file:///F|/fs_sbwh/images/jiaohuan.jpg" width="47" height="67" onclick="dd(this)"> </td>
</tr>
</table>