Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h1>The Element Object</h1> <h2>The innerHTML Property</h2> <button onclick="myFunction()">Try it</button> <p id="demo">Click the button double this text.</p> <script> function myFunction() { const element = document.getElementById("demo"); element.innerHTML += element.innerHTML; } </script> </body> </html>