Using Event Parameters

In this lesson, we will learn how to use event parameters in event handlers. Let's begin!

We'll cover the following

Most events have parameters that you can use in event handlers.

For example, when you catch the onmousedown event, you may utilize the mouse pointer coordinates. When you pass the event object to the handler method, you can access the parameters of an event.

Listing 6-15 shows an example.

Listing 6-15: Catching event parameters #

Get hands-on with 1200+ tech skills courses.