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 must have a variable to link the getElementById() followed by having an ID to pull from.

Question 2

When you invoke document.getElementById(), you must pass in a string parameter. What does the parameter represent?

It pramater would represent the h1 element

Question 3

What does the document.getElementById() method return?

it will take the id and document the values withing the element with the same ID

Question 4

What object is at the top of the DOM? In other words, what DOM object contains all other DOM objects?

Window


Coding Problems

You'll use the following elements to complete the coding problems:

Problem 1


Problem 2
A bald eagle

Problem 3
This is myDiv


Problem 4

Sign Up Form

Complete this form to sign up