<html> <body> <script language="JavaScript"> function function1() { document.all.myB.removeNode(true); } </script> <button id="myB" onclick="function1();">Remove me</button> </body> </html>