这篇翻译不完整。请帮忙从英语翻译这篇文章

DocumentType 接口表示了一个包含文档类型的节点 Node .

属性

继承自父节点 Node, 并实现了 ChildNode 接口.

DocumentType.entities 只读
一个在文档类型定义(DTD)中声明的实体NamedNodeMap,在这个映射(map)中的每个节点实现了Entity接口
DocumentType.internalSubset 只读
一个表示内部子集的DOMString,如果没有的话则为null ,例:"<!ELEMENT foo (bar)>"
DocumentType.name 只读
DOMString,文档类型的名称,例:<!DOCTYPE HTML>中的“html
DocumentType.notations 只读
在文档类型定义(DTD)中声明符号的NamedNodeMap,在这个映射(map)中的所有节点实现了Notation接口
DocumentType.publicId 只读
一个DOMString,例:HTML5中的空字符串——"-//W3C//DTD HTML 4.01//EN"
DocumentType.systemId 只读
一个DOMString,例:HTML5中的空字符串—— "http://www.w3.org/TR/html4/strict.dtd"

方法

继承方法自父节点,Node, 并实现了 ChildNode 接口.

ChildNode.remove()
从父节点的子节点的列表中移除这个对象.

规范

Specification Status Comment
DOM
DocumentType
Living Standard Added implemention of the ChildNode interface.
Removed the internalSubset, entities, and notation properties.
Document Object Model (DOM) Level 3 Core Specification
DocumentType
Obsolete No change from Document Object Model (DOM) Level 2 Core Specification.
Document Object Model (DOM) Level 2 Core Specification
CharacterData
Obsolete Added the publicID, systemID, and internalSubset properties.
Document Object Model (DOM) Level 1 Specification
CharacterData
Obsolete Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
DocumentTypeChrome Full support YesEdge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
entities
DeprecatedNon-standard
Chrome No support NoEdge Full support 12Firefox No support 1 — 6IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support 4 — 6Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
internalSubset
DeprecatedNon-standard
Chrome No support NoEdge Full support 12Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android ?
nameChrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
notations
DeprecatedNon-standard
Chrome No support NoEdge Full support 12Firefox No support 1 — 6IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support 4 — 6Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
publicIdChrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
systemIdChrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

参见

文档标签和贡献者

此页面的贡献者: RainSlide, mdnwebdocs-bot, aronlee, yatace, pasturn
最后编辑者: RainSlide,