DocumentType: thuộc tính systemId

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Thuộc tính chỉ đọc systemId của DocumentType trả về URL của DTD liên quan.

Với DocumentType tổng hợp, thuộc tính này phản ánh giá trị được truyền vào tham số của DOMImplementation.createDocumentType().

Giá trị

Một chuỗi.

Ví dụ

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

console.log(docType.systemId); // Hiển thị "http://www.w3.org/2000/svg"

Thông số kỹ thuật

Thông số kỹ thuật
DOM
# dom-documenttype-systemid

Tương thích trình duyệt