Document 对象
定义和用法
inputEncoding 属性返回用于文档的编码方式(在解析时)。
语法
documentObject.inputEncoding
实例
实例
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 对象其他扩展