加入收藏-方便您以后查找网页特效哦
你的位置:
主页
>>
JS技巧
>>table
点击获取表格行号
111
222
333
444
555
加入如下代码到body区域
<table width="100" border="1" onClick="if(event.srcElement.tagName=='TD') alert('这是第'+(event.srcElement.parentElement.rowIndex+1)+'行')"> <tr><td>111</td></tr> <tr><td>222</td></tr> <tr><td>333</td></tr> <tr><td>444</td></tr> <tr><td>555</td></tr> </table>
COPYRIGHT © 2003-2005 ALL RIGHTS RESERVED
业务联系
|
广告服务
|
网站建设
|
关于我们
|
免责声明
月光宝盒工作室
800*600