The DOM and JavaScript
We'll dive deeper into the DOM by discussing DOM data types and the properties and methods used to access DOM elements using JavaScript.
Read this article and locate the methods used with the "window" and "document" objects. For example, when a program uses an alert, it uses the "window.alert" method. JavaScript uses the "window.onload" method when a page is loaded. When a user clicks an element on a page, the "onclick" method is called. Remember that calling a method for an object uses dot (.) notation.
The Document Object Model (DOM) is the data representation of the objects that comprise the structure and content of a document on the web. This guide will introduce the DOM, look at how the DOM represents an HTML document in memory and how to use APIs
to create web content and applications.
Source: Mozilla, https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.