11

Interactive Content and Event Listeners

You are now familiar with the basic manipulation of the Document Object Model (DOM). In the last chapter, we had a look at events, and we saw that event listeners are constantly monitoring for whether a certain event is taking place; when it does occur, the specified event (a function) gets invoked.

In this chapter, we are going to take this knowledge one step further and use event listeners to create interactive web content. This chapter is really going to complete your DOM knowledge. We are going to cover the following topics:

  • Interactive content
  • Specifying events
  • The onload event handler
  • The mouse event handler
  • The event target property
  • DOM event flow
  • onchange and onblur
  • The key event handler

Get JavaScript from Beginner to Professional 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.