The DocumentType includes all doc-related doctype information. Currently, only Firfox, safri, Chrome, and Opera are supported. The constructor function is function DocumentType () {[native code]}.
DocumentType node features:
- NodeType: 10,
- NodeName: name of doc type
- NodeValue: The value is null.
- PrasentNode: the parent node is a Document node.
- No subnode ..
Browsers that support the DocumentType type Save the DocumentType node in document.doc type,
It has three attributes: name, entities, notitions, and name, which indicate the name of the document type. entities and notations are all NamedNodeMap objects, a description entity, and a description symbol.
In the browser, whether html or xhtml documents, entities, and notitions are all undefined, and only the name attribute is useful.
DocumentType nodes are not commonly used in Web browsers and cannot be dynamically created. They can only be created by the browser when parsing documents. In IE 8 and earlier versions, documenttypetype is not supported, because the document.doc type value is always equal to null. However, these browsers incorrectly interpret the document type declaration as a comment and create a comment node for it. IE9 will assign the correct object to document.doc type, but does not support access to DocumentType.