如果你不想你的程序出现问题,你可看看下面。 innerHTML property is read-only for the col, colgroup, frameset, head, html, style, table, tbody, tfoot, thead, title, tr and CommentNode elements in Internet Explorer. In Firefox, Opera, Google Chrome and Safari and in other cases in Internet Explorer, the innerHTML property is read/write
如:
<tr id="tr1">
<td>Firstname</td><td>Lastname</td>
</tr> <script>
alert(document.getElementById("tr1").innerHTML)的值为: <td>Firstname</td><td>Lastname</td></script>
innerHTML property is read-only for the col, colgroup, frameset, head, html, style, table, tbody, tfoot, thead, title, tr and CommentNode elements in Internet Explorer. In Firefox, Opera, Google Chrome and Safari and in other cases in Internet Explorer, the innerHTML property is read/write