Javascript table add row (table add line, grid add row, grid add line html table add line)
the following is New Row -> New Column -> New Text
var table = document.getElementByID("tableName");
var lastRow = table.rows.length;
var newRow = table.insertRow(-1);
var newColumn = newRow.insertCell(0); // 0 to number of columns
var newText = document.createElement('input');
newText.style.cssText='width:30em';
newColumn.appendChild(NewText);
newColumn.height='20';
沒有留言:
張貼留言