InterviewSolution
| 1. |
What The Hell Is The Dom? |
|
Answer» Basically, the Document Object MODEL is a way of looking at a document. In that sense, it isn't all that different to CSS, which uses ANOTHER kind of mental model. CSS uses the IDEA of selectors to interact with a document. The DOM, on the other hand, views a document as a tree of nodes: element nodes, attribute nodes and text nodes. The DOM provides a vocabulary for targeting and manipulating those nodes.
Basically, the Document Object Model is a way of looking at a document. In that sense, it isn't all that different to CSS, which uses another kind of mental model. CSS uses the idea of selectors to interact with a document. The DOM, on the other hand, views a document as a tree of nodes: element nodes, attribute nodes and text nodes. The DOM provides a vocabulary for targeting and manipulating those nodes.
|
|