<div class="htmlarea"> <textarea id="runcode47457"> <script language="JScript"> function numberCells() { var count=0; for (i=0; i < window.oTable.rows.length; i++) { for (j=0; j < window.oTable.rows[i].cells.length; j++) { alert(window.oTable.rows[i].cells[j].innerHTML); } } } </script> <table id="oTable" border="1"> <tr> <th>1</th> <th>2</th> <th>3</th> <th>4</th> </tr> <tr> <td>5</td> <td>6</td> <td>7</td> <td>8</td> </tr> <tr> <td>9</td> <td>10</td> <td>11</td> <td>12</td> </tr> </table> </textarea><br><input onclick="runEx('runcode47457')" type="button" value="运行代码"> <input onclick="doCopy('runcode47457')" type="button" value="复制代码"> <input onclick="doSave(runcode47457)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>