XML DOM systemId 屬性


DocumentType Object 參考手冊 DocumentType 對象

定義和用法

systemId 屬性返回外部 DTD 的系統識別字。

語法

documentObject.doctype.systemId


實例

下麵的代碼片段使用 loadXMLDoc() 把 "note_external_dtd.xml" 載入 xmlDoc 中,並顯示外部 DTD 的系統 id:

實例

xmlDoc=loadXMLDoc("note_external_dtd.xml");
document.write(xmlDoc.doctype.systemId);

輸出:

note.dtd


DocumentType Object 參考手冊 DocumentType 對象