In lab 1, we had to create our first JavaScript. We learned how to change the content of an HTML element using JavaScript by creating a button that says "Click Me!" We used the code <button type= "button" onclick= "myFunction()"> Click Me!</button> to create a button. Below the button, it says "This is a demonstration" but when someone clicks on the button, it changes to "Hello JavaScript."
No comments:
Post a Comment