Select a DOM Element with document.getElementById

Share this video with your friends

Send Tweet

Querying the DOM by an elements id is so common that JavaScript has given us a method to do this directly.

document.getElementById

In this lesson, we switch our querySelector function our with getElementById to fetch our movie list element.