Chapter 7Events

This chapter is about JavaScript events. In order to provide interactivity, your application must be capable of processing input from the user. Due to the evolving nature of technology, the definition of what constitutes an event is in a constant state of flux. JavaScript came into existence in 1995. In those days people interacted with web pages almost exclusively using a keyboard and mouse. JavaScript events primarily consisted of plain vanilla human computer interactions such as: keypress, mousedown, mouseup, click, scroll, and load.

With the proliferation of smartphones, tablets and similar devices the number of events has increased dramatically. Nowadays aside from the basic keyboard and mouse events, APIs are available to ...

Get Jump Start JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.