当我点击
remove
按钮数据已删除,但无法删除
tr
如表所示。
<tr>
<td>name</td>
<td><button id="removebutton" data-id="?">Remove</button></td>
</tr>
我想选择
tr公司
在顶部并将其从ajax响应中移除。
我试过:
$("#removebutton).on("click",function(){
success: function(res){
$(this).parents("tr").remove(); //this doesn't work
}
});