Create an HTML file with a button. Using JavaScript, each time a button is clicked use the array below to change the color of the Body
background to the corresponding index. The colors do not have to start over once the last color is reached.
["blue", "red", "yellow", "brown", "orange", "purple", "black", "green"]
Make the colors recycle once the last color is reached.
Create an HTML page containing 3 different buttons, one saying RED
, one saying GREEN
, and one saying BLUE
.
When the User holds the mouse over one of the buttons, change the background color according to the text value on the button.
- Add header text that states the current Color (e.g.
The current Color is SELECTEDCOLOR
with the name of the current color in place ofSELECTEDCOLOR