1
00:00:00,120 --> 00:00:05,790
We can use different types of events in our HDMI document to execute javascript code.

2
00:00:05,790 --> 00:00:12,870
There are many different types of events but some common events include Mouse Clicks mouse overs mouse

3
00:00:12,930 --> 00:00:17,770
out key down and document load.

4
00:00:17,780 --> 00:00:23,720
Let's take a look at a basic on click event in our sample HMO file.

5
00:00:23,720 --> 00:00:31,090
We have a button element that will display the time when clicked in this case.

6
00:00:31,100 --> 00:00:35,810
The event is the click and the function that is triggered is the date.

7
00:00:35,810 --> 00:00:36,320
Function

8
00:00:39,310 --> 00:00:46,120
reviews the inner HMO statement to display the output you can see in our web browser when I click the

9
00:00:46,120 --> 00:00:55,410
time button the date is displayed the date and time we can change on click on mouse over

10
00:01:01,900 --> 00:01:05,370
and now the function will be triggered when I hover my mouse over the button.

11
00:01:05,380 --> 00:01:06,580
I don't need to click.

12
00:01:06,910 --> 00:01:15,380
If we change it to on mouse out the date will be displayed once my mouse is out of the button area.
