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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.