CSE 121B: JavaScript Language

Manipulating Documents using the DOM

Overview

The Document Object Model or DOM represents the logical tree structure of a document. The DOM allows us to connect to the document through programming languages, including JavaScript.

"The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree. With them, you can change the document's structure, style, or content. Nodes can also have event handlers attached to them. Once an event is triggered, the event handlers get executed." - MDN Web Docs

Prepare

Check Your Understanding

  1. Complete the DOM Basics activity in your cse121b local repository space in a location that makes sense to you, e.g., such as a week02 sub-folder.
  2. Upload your work to your GitHub Pages enabled cse121b repository.