HTML and CSS Reference
As of this writing, Internet Explorer doesn't support this functionality. Custom events work
correctly in other browsers, though. Be aware of how custom events work for the exam,
however, because they are part of the official skills being measured.
Creating an event-full webpage
In this thought experiment, apply what you've learned about this objective. You can
find answers to these questions in the “Answers” section at the end of this chapter.
Consider an application where fields become auto-populated based on user input in
other fields. Auto-population is seen sometimes on forms that require users to fill in
their address. When the postal code is entered, the city, country/region, and so on
are populated based on that information. How would you apply the proper event
to a form that contains text boxes, check boxes, option buttons, slider bars, and so
on, so that as the form is filled in, other fields are populated automatically? Perhaps
when a field is filled automatically, its value triggers other fields to be populated.
How can you implement the solution, considering the timing of when events are
■ Events provide a way to interact with users when they perform actions on the
■ Events cascade or bubble through the entire DOM hierarchy.
■ Focus events occur when an object gets or loses focus.
■ Keyboard events occur when keyboard keys are pressed on a focused object.
■ Mouse events occur when the mouse clicks an object or the pointer is moved over or
off an object.
■ Drag-and-drop functionality provides a way to move elements from one container to