Chapter 23: The DOM and Events
Learning Objectives
Upon completing all the content in this chapter, you should be able to do the following:
- Understand the DOM is used to make dynamic web pages
- Use DOM objects and methods to alter an HTML web page
- Understand what events are and that JavaScript is an event driven language
- Handle and trigger events in JavaScript
- Differentiate between dynamic and static web pages
- Describe how the JavaScript environment of a browser is different from other JavaScript environments, such as Node.js
- Use the to include JavaScript into an HTML page
- Know to put your after the elements you want to alter, unless using load events
- Understand what the Document Object Model (DOM) is
- Understand and use the global variable window and these methods and properties:
window.alert()
,window.console
,window.confirm()
,window.location
. - Understand and use the global variable document and these methods and properties:
document.title
,document.getElementById()
,document.querySelector()
,document.querySelectorAll()
- Understand and use Element methods and properties:
element.innerHTML
,element.style
,element.getAttribute()
,element.setAttribute()
,element.addEventListener()
- Know that JavaScript is an event driven programming language
Key Terminology
Here is a list of key terms for this chapter, broken down by the page the term first appears on.
JavaScript in the Browser
- static
- dynamic
The DOM
- DOM (Document Object Model)
Events
- event
- event-driven
- inline event handler
- Handling
- Triggering
Event Listeners
- listener
- jQuery
- bubbling
Event Types
- mouseover event
- mouseout event
- load event