Week 4 - Practice Part A - Events

Instructions

Using JavaScript, write a function that will change the background color of the document to the color the user selects when a button is clicked.

Use an onClick event handler for each button which, when clicked, will call a function to change the background color and pass the necessary color information to the function.

Thinking Aloud - What'll It Take?

Use DOM - Document Object Model: document.bgcolor="colorName"