WDV221 Intro Javascript

Unit-5 Assignment - Event Handlers

1 - onclick

a. A button using HTML onclick that displays an alert when clicked.

b. A button using JavaScript onclick that logs a message to the console when clicked.

2 - onmouseover / 3 - onmouseout

A box that changes color and text when the mouse moves over it and changes back when the mouse moves off of it.

Hover over me!

4 - onchange

A dropdown to change the background color of the page using the onchange event.

5 - onload

This page uses the onload event to display a welcome message and log a message to the console.