案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function showRow()
5
  {
6
  alert(document.getElementById('myTable').rows[0].innerHTML)
7
  }
8
</script>
9
</head>
10
<body>
11
12
<table id="myTable" border="1">
13
<tr>
14
<td>Row1 cell1</td>
15
<td>Row1 cell2</td>
16
</tr>
17
<tr>
18
<td>Row2 cell1</td>
19
<td>Row2 cell2</td>
20
</tr>
21
<tr>
22
<td>Row3 cell1</td>
23
<td>Row3 cell2</td>
24
</tr>
25
</table>
26
<br />
27
<input type="button" onclick="showRow()" value="显示第一行的 innerHTML">
28
29
</body>
30
</html>
31