What is the best method in jQuery to add an additional row to a table as the last row?
Is this acceptable?
$(\'#myTable\').append(\'
-
// Create a row and append to table
var row = $(' ', {})
.appendTo("#table_id");
// Add columns to the row. properties can be given in the JSON
$(' ', {
'text': 'column1'
}).appendTo(row);
$(' ', {
'text': 'column2',
'style': 'min-width:100px;'
}).appendTo(row);
- 热议问题