XML DOM xmlStandalone 属性
Document 对象
定义和用法
xmlStandalone 属性设置或返回文档是否为 standalone。
语法
documentObject.xmlStandalone
实例
实例
xmlDoc=loadXMLDoc("books.xml");
document.write("XML encoding: " + xmlDoc.xmlEncoding);
document.write("<br>");
document.write("XML standalone: " + xmlDoc.xmlStandalone);
document.write("<br>");
document.write("XML version: " + xmlDoc.xmlVersion);
document.write("<br>");
document.write("Encoding used when parsing: " + xmlDoc.inputEncoding);
输出:
XML encoding: UTF-8
XML standalone: false
XML version: 1.0
Encoding used when parsing: UTF-8
XML standalone: false
XML version: 1.0
Encoding used when parsing: UTF-8
运行代码 »
Document 对象其他扩展