What does DOM mean in web development
This article mainly shows you "what is the meaning of DOM in web development", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "what is the meaning of DOM in web development" this article.
The meaning of DOM:
DOM, called File object Model (DocumentObjectModel, DOM), is a standard programming interface recommended by W3C to deal with extensible markup language.
DOM is the in-memory object representation of HTML documents, which provides a way to interact with web pages using JavaScript. DOM is the hierarchy (or tree) of nodes, where the document node is the root.
In fact, DOM is a document model described in an object-oriented way. DOM defines the objects needed to represent and modify the document and their behaviors and properties, as well as the relationships between these objects.
With JavaScript, we can ReFactor the entire HTML document. Such as adding, removing, changing, or rearranging items on a page.
To change something on the page, JavaScript needs to get access to all elements in the HTML document. This entry, along with the addition and removal of HTML elements
The methods and properties that are moved, changed, or removed are all obtained through the document object model (DOM)
Example:
The easiest way to get the content of an element in JavaScript is through the innerHTML attribute, so in the following case we can get the text content of the element through innerHTML
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
Document
Hello World!
Var demo=document.getElementById ("demo") [xss_clean]
[xss_clean] (demo)
Effect picture:
The above is all the contents of the article "what does DOM mean in web Development?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!