P3.7: DOM Queries & Selectors
The Document Object Model (DOM) is the tree-like structure browsers create from HTML files. Selecting DOM elements is key to making pages dynamic.
The Document Object Model (DOM) is the tree-like structure browsers create from HTML files. Selecting DOM elements is key to making pages dynamic.
Lesson: p3-7-dom-selection
The Document Object Model (DOM) is the tree-like structure browsers create from HTML files. Selecting DOM elements is key to making pages dynamic.
document.getElementById("id")document.querySelector(".selector") (Selects the first match)document.querySelectorAll(".selector") (Selects all matches as a NodeList)