I had used the following javascript code for adding rows
Code: Select all
function addRow(row)
{
table = row.parentNode.parentNode;
pos = row.rowIndex;
// Row for file
k = 0;
row = table.insertRow(pos);
cell = row.insertCell(k++);
//cell.setAttribute('align','right');
cell.innerHTML = 'File Upload';
cell = row.insertCell(k++);
cell.innerHTML = '<input type="text" name="title[]" class="text" />';
}Code: Select all
<input class="text" type="button" name="add" value="add more »" onclick="addRow(this.parentNode.parentNode)" />I want to add a function that deletes the row created by js
how to perform such ?
Please help me. Any help and suggestions will be highly appreciated.
Thank you