jQuery onclick delete table row

后端 未结 5 1199
别跟我提以往
别跟我提以往 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:36

    remove all your inline javascript and use click event.... no need to call onclick event in the attr... and this should dot he trick.. $(this).parents('tr').remove();

    try this

    
    
    
         //---^---here remove the onclick inline function for all.. 
      
     ....
    
    11 12 13 del

    working fiddle here

提交回复
热议问题