Javascript examples for DOM HTML Element:Form Event
Delete all input element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w . j a va2s . c o m*/ var btn = document.getElementById('btn'); btn.onclick = function () { document.getElementById('txt').remove(); this.remove(); }; } </script> </head> <body> <p id="txt">Can i put it here?</p> <input id="btn" type="submit" value="REMOVE THAT!!!"> </body> </html>