Week 4 Reveiw Flashcards
A standardized way to define a web page’s structure
DOM Document Object Model
DOM represents a web page as a _________ of objects
hierarchy
DOM objects have _________ and ___________.
properties methods
__________________ is the langauage of choise for dealing with the DOM
JavaScript
Two types of nodes
elements and texts
The document variable matches the ______ element
HTML
code to visit the child node of a page
document.body.childNodes[0]
child nodes include __________ lines
blank
method to get an element by its HTML tag
getElementsByTagName()
method to get elements by its HTML class
getElementsByClassName()
method to get an element by its ID
getElementById()
to create an array from getElements return use function
Array.from()
method to get the first node with CSS selector
querySelector()
method to get all nodes with CSS selector
querySelectorAll()
property of a node to get its inner HTML content
innerHTML