programming-examples/js/Htmldom/JavaScript function to add rows to a table.js

8 lines
239 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function insert_Row()
{
var x=document.getElementById('sampleTable').insertRow(0);
var y = x.insertCell(0);
var z = x.insertCell(1);
y.innerHTML="New Cell1";
z.innerHTML="New Cell2";
}