In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to start DOM, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Here is a brief introduction to the concept of DOM. When browsers support JavaScript, there is DOM, which can be traced back to Netscape2. Web developers want to access HTML elements and change their properties. For example, implement the fade in and out of HTML elements. The function of DOM is to provide such a way to access HTML elements.
What is DOM in the introduction to DOM (introduction to Dom)
In a nutshell, the File object Model (DocumentObjectModel,DOM) is an idea, an idea, and a way to enable Web developers to access HTML elements! It is just an idea, not a concrete method. So what is the specific method? The answer is DHTML.
When browsers support JavaScript, there is DOM, which can be traced back to Netscape2. Web developers want to access HTML elements and change their properties. For example, implement the fade in and out of HTML elements. The function of DOM is to provide such a way to access HTML elements. Specify exactly what method and how to access the element. As the browser version is updated, more permissions will be given to developers to manipulate HTML elements. DOM is a set of API for HTML and XML files. It provides a structural representation (representation) of the document, allowing you to change its contents and visibility. Its essence is to establish a bridge between web pages and Script or programming language.
All properties, methods, and events that web designers can manipulate and create documents are represented as [objects] (for example, document represents the "file itself" object, table objects represent HTML table objects, and so on). These objects can be accessed by most browsers today in Script.
DOM is most often used to communicate with JavaScript, that is, although the program is written in JavaScript, it uses DOM to access the page and its elements. In any case, DOM itself is designed as an independent programming language with a consistent API structure for accessing files; so although the focus of this site is on JavaScript, DOM can actually work with [any programming language].
The [World wide Web Association] (WorldWideWebConsortium,W3C) established the standard [DOM], which is called "W3CDOM". At a time when major browsers are actually doing it, W3CDOM makes powerful, cross-browser applications come true. This is something that web designers never dreamed of in an era when Netscape4 was incompatible with MSIE.
DOM structure:
In DOM, we will represent the programming objects of the XML file, called nodes (nodes). When InternetExplorer5 processes the linked XML file and stores it in DOM, it establishes a node for each basic component of the XML file. These basic components include elements, attributes, and processing instructions DOM will use different forms of nodes to represent different forms of XML components. For example, elements are stored in the Element node, while attributes are stored in the Attribute node. Table 1 lists the most important parts of these node types.
XML file component node name (nodeName object attribute) value of node (nodeValue object attribute) file (Document) root node in the file hierarchy (representing the entire XML file) # documentNull element (Element) element form name (for example, BOOK) null (any character data contained in the element) Text is the text that belongs to the elements, attributes, and entities represented by the parent node of this node.
# text parent XML component literal attribute (Attribute) attribute (and other name-value pairs, such as names and values in processing instructions) attribute names (e.g. Binding) attribute values (e.g. hardcover) processing instructions (ProcessingInstruction) processing instructions (XML declaration or custom processing instructions) targets of processing instructions (e.g. xml) the contents of the entire processing instruction except the target (e.g. Version "1.0") annotations (Comment) annotations # comment in text CDATA section (CDATASection) CDATA section # cdata-sectionCDATA section content file type (DocumentType) file form declares the name of the root element that appears in the DOCTYPE declaration (e.g. INVENTORY) Null entity (Entity) entity declaration entity name (e.g. image) null (the entity value is located in the child text node) tag DTD The declaration tag name (for example, BMP) > null (the system literal (Notation) of the volume label) is used to represent the basic node form of different XML file components in the table on the child Attribute named SYSTEM. Each of these types of nodes is a programming object that provides properties and methods to access related components.
You can get the name of each node from the nodeName attribute in the node. The name starts with the character # and represents the standard names of XML component nodes that are not named in the file. (for example, annotations in the XML file are not named. Therefore, DOM will use the standard name # comment. The names of other nodes are derived from the names of the corresponding components assigned to the XML file (for example, an element node that represents a morphological BOOK element can also be named BOOK. )
You can get the node value of each node from the nodeValue attribute of the node. If the XML component has a related value (for example, an attribute), the value will be stored in the node value of the node. If the XML component does not have a node value (for example, an element), DOM will set the node value to null.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.