Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Click me</button> <p id="demo"></p> <p>A function is triggered when the button is clicked. The function outputs some text in a p element with id="demo".</p> <script> function myFunction() { document.getElementById("demo").innerHTML = "Hello World"; } </script> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_ev_onclick by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:09:12 GMT --> </html>
Result:
Try it Yourself - © w3schools.com