DocumentType:systemId 属性
>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> |