DOM Problem Set

Selectors + Events

Color Changer

Toggle the body's background color between purple and white, when a button is clicked

<button>CLICK ME</button>

Starter Code:

Rainbow List

Change the background color of 7 different <li>'s when a button is clicked, each to a different color of the rainbow.  Make your code DRY!

<button>CLICK ME</button>

<ul>
	<li>List Item 1</li>
	<li>List Item 2</li>
	<li>List Item 3</li>
	<li>List Item 4</li>
	<li>List Item 5</li>
	<li>List Item 6</li>
	<li>List Item 7</li>
</ul>

Starter Code:

End Result:

Mad Libs

Create a simple Mad Libs app with inputs for different parts of speech.  When user clicks "GO", generate a mad-lib using the form data.  Please be more creative than me...

Hint: You will need to research how to extract a value from an input

Counting Events

Create a simple Mad Libs app with inputs for different parts of speech.  When user clicks "GO", generate a mad-lib using the form data.  Please be more creative than me...

Hint: You will need to research how to extract a value from an input

Printer Friendly - DOM Problem Set

By Colt Steele

Printer Friendly - DOM Problem Set

  • 1,899