![codecamp](https://atts.w3cschool.cn/attachments/image/20230811/1691741920856601.png)
XML DOM strictErrorChecking 属性
XML DOM strictErrorChecking 属性
![Document 对象参考手册](https://7n.w3cschool.cn/statics/images/course/up.gif)
定义和用法
strictErrorChecking 属性设置或返回是否强制进行错误检查。
当设置为 false 时,实现不会对每个可能的错误情况进行测试。该属性默认设置为 true。
语法
documentObject.strictErrorChecking
实例
下面的代码片段使用 loadXMLDoc() 把 "books.xml" 载入 xmlDoc 中,并返回是否强制进行错误检查:
实例
xmlDoc=loadXMLDoc("books.xml");
errCheck=xmlDoc.strictErrorChecking;
document.write(errCheck);
errCheck=xmlDoc.strictErrorChecking;
document.write(errCheck);
输出:
true
尝试一下 »
![Document 对象参考手册](https://7n.w3cschool.cn/statics/images/course/up.gif)