|
An HTML page has two components as shown in the figure below:

Document Object Model (DOM): • The W3C Document Object Model is a platform and language neutral interface that allows programs and scripts to dynamically access and update content,structure and style of a document
• The HTML DOM is the Document Object Model for HTML. The HTML DOM defines a standard set of objects for HTML and a standard way to access and manipulate HTML documents
• The HTML DOM views HTML documents as a tree structure of elements. All elements,along with their text and attributes,can be accessed and manipulated through the DOM tree
• The HTML code below shows DOM Body,Form and Input objects. The Input objects are embedded in the Form and the Form is embedded in the Body object
1: <html> 2: <head></head> 3: 4: <body> 5: <form id=”loginForm”> 6: <input type=”text” id=”userName”/> 7: <input type=”submit” id=”login” value=”Login”/> 8: </form> 9: </body> 10: </html>
The languages that can be used within the HTML DOM to access DOM objects are Java,JavaScript,and VBScript
|