更新时间:2023-12-05 07:50:46
这是您想要的吗? FIDDLE
Is this what you want? FIDDLE
$('#container').on('click', '.survey_del', function() {
var row = $(this).closest('tr');
if (x >= 2) {
x--;
}
var previous = $(row).prev('tr');
$(previous).find('td.row-3').html("<input type='button' class='survey_del' style='float: right' value='-' id='del" + x + "'>");
$(row).remove();
});
然后将del按钮类重命名为survey_del
.
And rename the del button class to survey_del
.