innerHTML 属性设置或返回表格行的开始和结束标签之间的 HTML。
语法:tablerowObject.innerHTML=HTML
<html>
<head>
<script type="text/javascript">
function getInnerHTML()
{
alert(document.getElementById("tr1").innerHTML
);
}
</script>
</head>
<body>
<table border="1">
<tr id="tr1">
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr id="tr2">
<td>Peter</td>
<td>Griffin</td>
</tr>
</table>
<br />
<input type="button" οnclick="getInnerHTML()"
value="Alert innerHTML of table row" />
</body>
</html>