한국어
<!-- 把下면代码加到<body>区域中 --> <script> function showText(){ var oTbody=table1.children.item(0); for(var i=0;i<oTbody.children.length;i++) { var oTR=oTbody.children.item(i); for(var j=0;j<oTR.children.length;j++) text1.value+="第"+(i+1)+"行;"+"第"+(j+1)+"列的内容是:"+oTR.children.item(j).innerHTML+"n"; } } </script> <table border="1" id="table1"> <tr> <td>safssd</td> <td>asfdasdf</td> <td>asfasdfsafsad</td> </tr> <tr> <td>asdfafsda</td> <td>sdfasfasdsadf</td> <td>sdfasdfasdfasfd</td> </tr> <tr> <td>较</td> <td>大</td> <td>约</td> </tr> </table> <button onclick="showText()">显示内容</button> <textarea id="text1"rows="10" cols="100"> </textarea>