Cross browser adding row to table- JQuery?
Does anyone know a good way to dynamically add a row to a tab开发者_JAVA技巧le in jQuery?
Technically for a cross browser implementation you should do $('table tbody').append("Foo")
Since IE doesn't automatically add the tbody for you but other browsers do.
Try
$('table').append('<tr><td>Foo</td></tr>');
精彩评论