jQuery onclick delete table row

后端 未结 5 1201
别跟我提以往
别跟我提以往 2021-01-16 14:07

How to delete table row on click?

Here is a jsfiddle.

I want to delete only row on which del link is nested, not the last row how script is doing now.

<
5条回答
  •  一整个雨季
    2021-01-16 14:38

    $('td a').on('click',function(){
       e.preventDefault();
       $(this).parent().parent().remove();
    });
    

提交回复
热议问题