1. DOM2 and DOM3
The DOM2 level specification defines modules that are used to enhance the DOM1 level. "DOM2-Level core" introduces some XML namespace-related methods for different DOM types, which are only used in XML or XHTML and have no practical meaning for HTML documents. In addition to the methods associated with XML namespaces, the DOM2 core defines methods for creating document instances programmatically, and also supports the creation of DocumentType objects.
The "DOM2-level style" module is primarily developed for the style information of the operating element, and its brief features are summarized as follows:
L Each element has an associated style style that can be used to determine and modify the style within the row
To determine the calculated style of an element (including all CSS rules applied to him), you can use the getComputedStyle () method
L IE does not support the getComputedStyle () method, but provides all elements with the ability to return the same information Currentstyle properties
L can access the style sheet through the Document.stylesheet collection
All browsers except IE support the interface to the style sheet, IE also provides its own set of properties and methods for almost all corresponding DOM functions.
The DOM2 level traversal and scope module provides different ways to interact with the DOM structure, briefly summarizing the following:
L traversal uses nodeiterator or treewalker to perform a depth-first traversal of the DOM
L Nodeiterator is a simple interface that allows only one node's stride to move forward and backward, while Treewalker provides the same colleague and supports movement in all directions of the DOM structure, including the parent, sibling, and child nodes.
The L range is the selection of specific parts of the DOM structure, and then the means to perform the appropriate actions
L Use range Select selection to keep the document structure in good form while deleting portions of the document, or to copy the corresponding parts of the document
L IE8 and earlier versions do not support "DOM2-level traversal and scope", but it provides a proprietary text range object that can be used to perform simple text-based scoping operations. IE9 full support for DOM traversal
Javacript Advanced Programming-dom2 and DOM3