reading-notes


Project maintained by mr-atta Hosted on GitHub Pages — Theme by mattgraham

THE OBJECT

Accessing an object and dot notation

Accessing Object

Document Object Model (DOM)

DOM

DOM tree

DOM tree

DOM tree steps:

  1. Locate the node that represents the element you want to work with.
  2. Use its text content, child elements, and attributes.
    • Can return one element, or they may return a Nodelist, we may use id (or any) for Customizable.

      .Getelement by id

    • Node-list is a type of object called a collection.
      • Nodelists have a method called item(), they return an individual node
    • we can use sentences like: for , if … in it.
    • An element node can contain multiple text nodes and child elements that are siblings of each other.