Most objects have events, not just HTML controls. For example tags such as <table>, <tr>, <td>, <a>, and <strong> also have events.
The following <tr> tags, in the table below, utilize the onMouseOver and onMouseOut events to change the color of the row as the mouse moves over the row and out of the row.
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| 10 | 11 | 12 |
| 13 | 14 | 15 |
| 61 | 17 | 18 |
| 19 | 20 | 21 |
| 22 | 23 | 24 |
Another example is the link below. Here the <a> tag uses the onMouseOver tag to change the location of the Web browser. Moving the mouse over the link automatically takes you to Yahoo without having to click the link.
The final example is using is the onMouseOver and onMouseOut event of the <strong> tag to change the bgcolor property of the document. Moving over the words "Change Color" will change the document color to green or blue.
Change Color
In this assignment, you are dynamically updating a class for the TR tag. When you cause the onMouseOver event, you are changing the class for the TR tag. Therefore, that TR tag is styled differently. When you cause the onMouseOut event, you are changing the class back to its original setting.
In order to get credit for this assignment, make this assignment change the color of the TDs using the onMouseOver and onMouseOut events. You will need to create new classes!