Javascript: HTML DOM

The Document Object Model (DOM) is a programming API for HTML.  It defines the logical structure of documents and the way a document is accessed and manipulated.

With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content.  And in this case, we are talking about modifying the content of the HTML elements.

In the earlier examples, there were 2 examples where we have used Javascript to find and access HTML elements.

  1. getElementById
  2. getElementsByName

We have used the above 2 methods to access a particular HTML element and make changes or updating the content in the element.

Series Navigation<< Javascript: Processing radio buttons using for loop
Javascript: Accessing and modifying DOM elements >>