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