<SCRIPT>
function addTable(){
var tb1 = document.createElement("TABLE");
tb1.border="1px";
var row1 = tb1.insertRow(0);
var cell1=row1.insertCell(0);
var cell2=row1.insertCell(1);
document.getElementById("mydiv").appendChild(tb1);
cell1.innerHTML="wanghr100";
cell2.innerHTML="panyuguang962";
row1.insertCell(2).innerHTML="要注意:给的例子要考虑全面";
}
</SCRIPT>
<BODY>
<div id="mydiv" style="width:400;height:300;"></div>
<INPUT TYPE = "button" VALUE = "AddTable" onclick = "addTable()">
function addTable(){
var tb1 = document.createElement("TABLE");
tb1.border="1px";
var row1 = tb1.insertRow(0);
var cell1=row1.insertCell(0);
var cell2=row1.insertCell(1);
document.getElementById("mydiv").appendChild(tb1);
cell1.innerHTML="wanghr100";
cell2.innerHTML="panyuguang962";
row1.insertCell(2).innerHTML="要注意:给的例子要考虑全面";
}
</SCRIPT>
<BODY>
<div id="mydiv" style="width:400;height:300;"></div>
<INPUT TYPE = "button" VALUE = "AddTable" onclick = "addTable()">