Javascript examples for DOM:Element remove
remove dynamically generated table elements
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <table id="test"> <tbody> <tr> <td>one</td> <td>two</td> <td id="test" onclick="removerow(this);">remove</td> </tr> </tbody> </table> <script type="text/javascript"> function removerow(e) {//from w w w. j a v a 2s .c o m e.parentNode.remove(); } </script> </body> </html>