0
What is meant by dom in JavaScript explain practically
6 Antworten
0
Thanks Thex.But whether all the elements will present in dom and if so those elements Wil get loaded into the page when the events get triggered?
0
It's a way to describe the structure of a XML/HTML document. DOM describes the hierarchical structure defined by tags in such document types. Elements can have children and/or parents. The mapping of the tag hierarchy is done in a tree structure and called DOM. It's a object based model who describes this paradigm and represents it.
This is a HTML document which may be represented in a DOM:
<html>
<head>
</head>
<body>
</bod>
</html>
parent: html, children: head, body
0
In the case of Javascript/HTML all tags which are part of the loaded site are also part of the DOM. If you modify the DOM and add or remove tags through JS the DOM gets modified. But I'm not sure if I understand your question correctly.
0
Where does the dom stores the elements?
0
yup got it...thanks thex for your explanation...
0
http://taligarsiel.com/Projects/howbrowserswork1.htm
https://eloquentjavascript.net/13_dom.html
it's stored by the browser and accessed by JS
JS builds up a object structure based on the DOM structure
however see the links for a more detailed technical description