O'Reilly logo

Microsoft® Start Here!™ Learn JavaScript by Steve Suehring

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 5. Handling Events with JavaScript

After completing this chapter, you will be able to

  • Recognize common JavaScript events

  • Understand how to handle events with JavaScript and jQuery

  • Validate data entered into a web form

EVENTS ARE THINGS YOU REACT TO (or sometimes ignore intentionally). Consider what happens when the temperature in your house or dwelling falls below a certain value—for example, 69 degrees Fahrenheit in my house. The event occurs when the temperature falls below 69; the handling of that event is done by a thermostat. The thermostat reacts or handles the event by starting the furnace. When the temperature falls from 71 to 70, the thermostat doesn’t care; it ignores such events.

For webpages, events include such things as mouse ...

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