var tbl = document.getElementById('table_id');
var lastRow = tbl.rows.length;
// this adds the row to the end of the table
var row = tbl.insertRow(lastRow);
var cell1 = row.insertCell(0);
var textNode = document.createTextNode("Hello World");
cell1.appendChild(textNode);
by creating set of cells you can append to the row which you have created.
No comments:
Post a Comment