Content deleted Content added
No edit summary Tags: Reverted Visual edit Mobile edit Mobile web edit |
m Reverted 1 edit by 2603:8081:1E04:5AC0:E5F0:F8A2:3C8A:9565 (talk) to last revision by ClueBot NG |
||
Line 104:
==Document Object Model==
{{main|Document Object Model}}
DHTML is not a technology in and of itself; rather, it is the product of three related and complementary technologies: HTML, Cascading Style Sheets (CSS), and [[JavaScript]]. To allow scripts and components to access features of HTML and CSS, the contents of the document are represented as objects in a programming model known as the [[Document Object Model]] (DOM).
The DOM API is the foundation of DHTML, providing a structured interface that allows access and manipulation of virtually anything in the document. The HTML elements in the document are available as a hierarchical [[tree (data structure)|tree]] of individual objects, making it possible to examine and modify an element and its attributes by reading and setting properties and by calling methods. The text between elements is also available through DOM properties and methods.
The DOM also provides access to user actions such as pressing a key and clicking the mouse. It is possible to intercept and process these and other events by creating [[event handler]] functions and routines. The event handler receives control each time a given event occurs and can carry out any appropriate action, including using the DOM to change the document.
==Dynamic styles==
|