我有一个重复器,其中包含一个表格。我希望用户能够通过向表格中添加新行来向重复器中添加新行。
有谁能给我一些想法?由于我对jQuery非常陌生,所以有人可以给出示例代码吗?
var tableToUpdate = $('#yourTableId'); // select the table
var rowToAdd = $('<tr></tr>'); // this will create a table row element
rowToAdd.append('<td>some content for this cell</td>'); // add the columns to your new row
tableToUpdate.append(rowToAdd); // append the row to the end of the table