O'Reilly logo

HTML5 Programming with JavaScript For Dummies by John Paul Mueller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12

Handling Events

In This Chapter

arrow Understanding how events work

arrow Interacting with events

arrow Handling keyboard events

arrow Creating a custom event

A lot of developers make a big deal out of events and feel that they’re just a bit confusing. However, all that an event really says is that something has happened. Something happens, and then your application reacts to it. There’s a bit more to it than that, but if you want to avoid becoming confused about events, always think about them as saying something has happened.

This chapter examines events in detail because events are the action portion of an application — the part that a user actually sees when interacting with the application. Previous chapters show you how to perform some basic tasks when reacting to events, such as displaying a dialog box or information onscreen when a user clicks a button. This chapter goes into more detail about events and helps you see how they can make your applications easier and more exciting to use.

Most HTML controls provide sufficient events to support most user needs. In some cases, you may decide ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required