此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

DocumentType:systemId 属性

基线 广泛可用

自 2015年7月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

DocumentType 接口的 systemId 只读属性返回关联 DTD 的 URL。

对于合成的 DocumentType,此属性将反映 DOMImplementation.createDocumentType() 参数中给出的值。

字符串。

示例

js
const docType = document.implementation.createDocumentType(
  "svg",
  "",
  "http://www.w3.org/2000/svg",
);

console.log(docType.systemId); // “http://www.w3.org/2000/svg”

规范

规范
DOM
# dom-documenttype-systemid

浏览器兼容性