Course lesson
Select a DOM Element with document.getElementById
Querying the DOM by an elements id is so common that JavaScript has given us a method to do this directly.
- Duration
- 1 min
- Access
- Free
- Transcript
- Available
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.