We have few option jQuery library lot option includes code based ,
depends on user experience
How to remove the last row of table?
$('#tblemp tr:last').remove();
how to remove second row from the table?
$('#tblemp tr:eq(1)').remove();
Based condition on jQuery library :
$('#tblemp').each(function(){
if($('tbody', this).length > 0){
$('tbody tr:last', this).remove();
}else {
$('tr:last', this).remove();
}
});
0 Comments