DHTML simply means dynamic HTML.Dynamic = changes each time it is viewed, constantly changing. Like a flowing river.
Instead, DHTML is a collection of technologies that supports HTML and extends the interactive capabilities of browsers.
Document Object Model Provides away to TREAT individual elements in HTML as objects.
Since HTML provides structures for element in your Webpage. DOM also recognizes the structure of an HTML document. As HTML elements may be placed within other elements, DOM reads the HTML structure as a map. It sees the map as composed of sections, and within each section are subsections and their elements.
Consider each element in your HTML as an Object. DOM reads each HTML element as a unique object and as a node within your structure. However, to set an element as a document you must give it its unique identity by using ID attribute. This can be done This Ways:
IDs are mainly used in HTML for layout purposes and to identify the unique elements in your HTML code. Because it is a unique identifier, each ID can be used only once in the page in defining specific elements.
id Specifies a unique id for the element. Naming rules: Must contain at least one character Must not contain any space characters In HTML, all values are case- insensitive
Definition and Usage The getElementById() method accesses the first element with the specified id. Syntax document.getElementById("id")
document.getElementById returned a reference to our HTML element myText. We stored this reference into a variable, myTextField, and then used the valueproperty that all input elements have to use to grab the value the user enters. There are other ways to accomplish what the above script does, but this is definitely a straight-forward and browser-compatible approach.