Event Handlers

There are several event handlers here. We will attach them to events in several different ways.
In the first button we use an inline handler
onclick="thankyou();return false;"

In the rest of the buttons we assign the event handlers with
var theSecondButton = document.getElementById("theSecondButton");
var theThirdButton = document.getElementById("theThirdButton");
...
In the ListItems we will use
var x = document.getElementsByTagName("li");
To highlight certain elements we will use
var h = document.getElementsByClassName("highlight");

Event Handler inline

Event Handlers by id

Event Handlers by TagName

In this section we are assigning mouseover/mouseout event handlers in a loop to all the <li> items.