<html>
<head>
<title>test</title>
</head>
<body>
<div id="div1"><b>aaa</b></div>
<table id="table1">
<tr id="tr1"><td>1</td><td>2</td></tr>
<tr id="tr2"><td>3</td><td>4</td></tr>
</table>
</body>
<script type="text/javascript">
var table1 = document.getElementById("table1");
var tr1 = table1.rows[0];
var htmlSpan = document.createElement("tr");
htmlSpan.innerHTML = "<td>aaa</td><td>bbb</td>";
//htmlSpan.style.height = 25;
tr1.parentNode.insertBefore(htmlSpan,tr1);
</script>
</html>
为什么这段代码在IE6下无法成功。
慕桂英4014372
相关分类