Prev Demo
HTML5
>
Mouse Events
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>onclick Event</title> </head> <body> <h2> click on the button to open the value</h2> <button onclick="myfunction()">Click ME</button> <p id="demo"></p> <p>manideep sudheer</p> <script> function myfunction() { document.getElementById("demo").innerHTML = "helloTechFunda"; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output