In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what does DOM mean?". Many people will encounter such a dilemma in the operation of actual cases. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
What does DOM mean?
DOM defines the interface for JavaScript to operate HTML documents, and provides access to HTML documents (such as body, form, div, textarea, etc.) and operation methods.
DOM uses "tree structure" to express HTML documents. With JavaScript, you can ReFactor the entire HTML document, adding, removing, changing, or rearranging content on the page.
To change something in an HTML document, JavaScript needs to get access to the HTML document. This entry, along with the HTML element and the addition, movement, change, or removal of the HTML element, is obtained through DOM.
It is an object for each item of an JavaScript,HTML document (HTML tags, tag attributes, text within tags, spaces, tab, and so on). The tags of HTML documents are nested layer by layer, and the outermost layer is html >. The document object Model (DOM) is also nested layer by layer, but is usually understood as the shape of a tree. The root of the tree is a document object, which can be understood as the entire HTML document and the entrance to the HTML document. Under the root of the tree (the picture of the tree is usually drawn backwards, just like a genetic pedigree or genealogy, the root is the only common ancestor) is a child-level object, and the child object also has its own child object, except the root object. All objects have their own parent objects, and the children of the same object are brothers.
In this frame structure of "parthenogenetic family tree" composed of "father and son brothers", the content of each HTML document can be accurately located. The document object Model (DOM) organizes the entire HTML document into such a tree structure that each item in the tree structure is treated as a node. Various programming languages, including JavaScript, can access and change the details of web pages through the document object model.
The W3C has developed a series of standards for the document object Model (DOM) and is developing more related standards. In addition to supporting some of these standards, modern browsers also support some historically established programming interfaces that were popular long before the W3C standard was established. In other words, the history of the technology used by modern browsers is so complicated that there is no standard for DOM technology that is commonly used by some people.
Let's take a look at the following HTML code:
Html >
Head >
Meta http-equiv= "Content-Type" content= "text/html; charset=utf-8" / >
Title > First pages > title
/ head >
Body >
H 2 > testplate amp H2 >
!-- NOTEC music->
P > Welcome toem > DOM / em > World! / p >
Ul >
Li > Newer/li >
/ ul >
/ body >
/ html >
After the document is loaded into the browser, it is represented as a "tree" according to the DOM specification.
This is the end of the content of "what does DOM mean?" thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.