Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
DocumentType インターフェイスは、 doctype を包含する Node を表します。
EventTarget Node DocumentType親インターフェイスである Node からプロパティを継承しています。
DocumentType.name 読取専用文書の型です。HTML 文書では常に "html" ですが、XML 文書では様々です。
DocumentType.publicId 読取専用文字列で、文書型の識別子です。HTML では常に空文字列 ("") ですが、例えば SVG 文書では "-//W3C//DTD SVG 1.1//EN" です。
DocumentType.systemId 読取専用文字列で、DTD に関連付けられた URL が入ります。HTML では常に空文字列 ("") ですが、例えば SVG 文書では "http://www.w3.org/2000/svg" です。
親インターフェイスである Node からメソッドを継承しています。
DocumentType.after()一連の Node オブジェクトまたは文字列を、この DocumentType の親の子リストの中、この DocumentType オブジェクトの直後に挿入します。
DocumentType.before()一連の Node オブジェクトまたは文字列を、この DocumentType の親の子リストの中、この DocumentType オブジェクトの直前に挿入します。
DocumentType.remove()オブジェクトをその親の子リストから削除します。
DocumentType.replaceWith()文書型を指定されたノードの集合に置き換えます。
| DOM # interface-documenttype |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年4月14日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.