Do Not Touch Anything in the body
tag. You are only allowed to write code in javascript.
-
When the first link on the page is clicked, the background color should change to something that is not white, blue, or black.
-
When the second through fifth links are clicked, the relevant part of the song should be displayed.
Remember to use the
DOMContentLoaded
event:document.addEventListener('DOMContentLoaded', doSomething);
or you might have a bad time.
- When the last link is clicked, one line of the chorus should be displayed. Each subsequent click should display an additional line of the chorus until all 6 lines are displayed.
- For each click, the background color changes to a random color.
- Keep count of the total number of clicks, and alert the user when they get to five clicks.
- For each click the background color changes to a random color, then changes back after 5 seconds.
- Let the user enter the name of the element to reveal through an HTML input. Use a button to submit the input. (Hint: you won't need an
event
parameter in your callback for this.)
- Let the user know when they've entered the name of an element that doesn't exist.