Lab: Change the Color
In this lab you will set up an event listener to change the background color of a div when that div is clicked.
- If the div is not purple, change the background color to purple
- Otherwise change it to yellow
- Feel free to use any color combination of your choice
- Bonus Challenge: What other properties can you change on the element?
Change the Color Solution
Lab: Say Hello
In this lab you will set up an input form where you can enter a name, and the page will display text greeting that name.
- Set up a form with a text input, and submit button
- When a user inputs their name and hits submit the page displays a personalized greeting for that name
- Format the name so that it's always capitalized
- Bonus Challenge: Can you get it to say hello to some names, and tell others to go away?
Lab: Creating, and Modifying a List
In this lab you will create a user interface to programatically generate a list based on user input.
- Create a form that will accept user input
- When the form is submitted use the input value to generate a new list item
- Bonus Challenge: Can you make it remove an item when the user clicks on it?