The document Object

  • The document object is your door into accessing DOM objects
  • Has a number of useful properties and methods for accessing elements
  • document.getElementById() - Gets an element with a particular id attribute
  • document.getElementsByClassName() - Gets all elements with a particular class attribute
  • document.querySelector() - Gets the first element with a CSS selector

20 / 24