strictErrorChecking 屬性

strictErrorChecking 屬性可設定或返回是否強制進行錯誤檢查(error-checking)。

正文,定義和用法,語法,實例,

正文

定義和用法

strictErrorChecking 屬性可設定或返回是否強制進行錯誤檢查(error-checking)。
在設定為 false 後,實現不會對每個可能的錯誤情況進行測試。此屬性被默認設定為 true。

語法

documentObject.strictErrorChecking

實例

在所有的例子中,我們將使用 XML 檔案 books.xml,以及 JavaScript 函式 loadXMLDoc()。
以下代碼片段可返回錯誤檢查是否被設定為強制執行:
xmlDoc=loadXMLDoc("books.xml");var errCheck=xmlDoc.strictErrorChecking;document.write(errCheck);輸出:
true

相關詞條

熱門詞條

聯絡我們