Jump to content

Excelsior100

Members
  • Posts

    1
  • Joined

  • Last visited

Excelsior100's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I am trying to make a button that says "Click Me", that when clicked, changes the text above it from "Hi" to I'm Clicked!". Here is the source: ---------------------------------------------------------------------------------------------------------------------- <!DOCTYPE html> <html> <body> <p id="demo">Hi.</p> <script> function myFunction() { document.getElementByID("demo").innerHTML = "I'm Clicked!"; } </script> <button type="button" onclick="myFunction()">Click Me!</button> </body> </body> </html> ------------------------------------------------------------------- What am I doing wrong?
×
×
  • Create New...