这还不简单var row;
var cell;
var tbody = tblUpdate.childNodes[0];
tblUpdate.appendChild( tbody );
for (var i=0; i<100; i++)
{
row = document.createElement( "TR" );
tbody.appendChild( row );
for (var j=0; j<10; j++)
{
cell = document.createElement( "TD" );
row.appendChild( cell );
cell.innerText = "Row " + i + ", Cell " + j;
}
}
var cell;
var tbody = tblUpdate.childNodes[0];
tblUpdate.appendChild( tbody );
for (var i=0; i<100; i++)
{
row = document.createElement( "TR" );
tbody.appendChild( row );
for (var j=0; j<10; j++)
{
cell = document.createElement( "TD" );
row.appendChild( cell );
cell.innerText = "Row " + i + ", Cell " + j;
}
}
<script language=javascript>
function insertrow(){otable=document.getElementById("table1")
orow=otable.insertRow()
ocol=orow.insertCell()
ocol.innerText="sadfsad"}</script>
<table border="1" width="100%" id="table1">
<tr>
<td> </td>
</tr>
</table>