Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p id="demo">Click the button to delete my HTML content (innerHTML).</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("demo").innerHTML = ""; } </script> </body> </html>
Result: