<div class="htmlarea"> <textarea id="runcode56162"> <table border="1" cellpadding="" cellspacing="" width="" id="table1"> <tr> <td>table1</td> </tr> </table> <table border="1" cellpadding="" cellspacing="" width="" id="table2"> <tr> <td>table2</td> </tr> </table> <table border="1" cellpadding="" cellspacing="" width="" id="table3"> <tr> <td>table3</td> </tr> </table> <table border="1" cellpadding="" cellspacing="" width="" id="table4"> <tr> <td>table4</td> </tr> </table> <table border="1" cellpadding="" cellspacing="" width="" id="table5"> <tr> <td>table5</td> </tr> </table> <table border="1" cellpadding="" cellspacing="" width="" id="table6"> <tr> <td>table6</td> </tr> </table> </textarea> <br><input onclick="runEx('runcode56162')" type="button" value="运行代码"><input onclick="doCopy('runcode56162')" type="button" value="复制代码"> <input onclick="doSave(runcode56162)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">[Ctrl A Select All 참고: </a>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 </div>]<br><div class="htmlarea"> <textarea id="runcode47876"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title> </title>제목 없는 문서 <table width="100%" border="1"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </textarea> <br> <input onclick="runEx('runcode47876')" type="button" value="运行代码"><input onclick="doCopy('runcode47876')" type="button" value="复制代码"><input onclick="doSave(runcode47876)" type="button" value="保存代码"> <a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank"> </a>[Ctrl A 모두 선택 참고: </div>외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 <script language="javascript"> <!-- function fnGetTable( oEl ) { try{ while( null != oEl && oEl.tagName!="TABLE" ) { oEl = oEl.parentElement; } return oEl; } catch(e) { return null; } } function pos() { try{ oElement = document.elementFromPoint(event.x,event.y); oElement = fnGetTable(oElement); if(oElement.tagName=="TABLE") alert("当前位置"+oElement.id); } catch(e) {} } // --> </script>]<script language="javascript" type="text/javascript"> document.body.onclick=function(e){ e=e|| window.event; var obj=e.target || e.srcElement; if(obj.tagName=="TD"){ obj=obj.parentNode; } alert(obj.rowIndex); } </script>