The following is my code
$(document).ready(function(){
$(\'#click\').click(function(){
$(\'#table\').append(\'&a
-
Find the last row with a selector and the delete that row like that:
$('#table > tr:last').remove();
This will delete the last row in the table. What if you want to delete the first?
$('#table > tr:first').remove();
That's it. There is codeschool online course for jQuery. You will find lot's of valuable stuff there including selectors and DOM manipulation. Here is a link: http://jqueryair.com/
- 热议问题