<< Home

How does javascript handle events?

Javascript handles different events by running a certain action for different events associated with an object.

An example of an event would be a mouse click on a button.

 

 

Another example would be if we wanted to have a script that handles the event for when we hover our mouse over an image. For this we can use the built in onMouseOver event to make something happen when we place the mouse on top of an image.

Examples of events:

 

For the assignment you need to explain what a method is and show and example.