Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove clicked table row from table

<script>
    function RemoveRow(o) {
     //no clue what to put here?
     var p=o.parentNode.parentNode;
         p.parentNode.removeChild(p);
    }
</script>

<table>
   <tr>
       <td><input type="button" value="Delete Row" onclick="RemoveRow(this)"></td>
   </tr>
   <tr>
       <td><input type="button" value="Delete Row" onclick="RemoveRow(this)"></td>
   </tr>
   <tr>
       <td><input type="button" value="Delete Row" onclick="RemoveRow(this)"></td>
   </tr>
</table>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #clicked #table #row #table
ADD COMMENT
Topic
Name
1+8 =