DOM Objects Worksheet
Question 1
In order to use the document.getElementById() method to 'get a handle' on an element, what attribute must that element have?
It needs to have an id element
Question 2
When you invoke document.getElementById(), you must pass in a string parameter. What does the parameter represent?
It represent the id element
Question 3
What does the document.getElementById() method return?
It returns the id attribute with the specified value
Question 4
What object is at the top of the DOM? In other words, what DOM object contains all other DOM objects?
The document is at the top, meaning it represents the entire HTML
Coding Problems
You'll use the following elements to complete the coding problems:
Problem 1Problem 2
Problem 3
Problem 4