HTML DOM Document strictErrorChecking 屬性

定義和用法

不推薦使用 strictErrorChecking 屬性。請勿使用它。

strictErrorChecking 屬性在所有新瀏覽器中都返回 undefined

注釋:strictErrorChecking 屬性是 DOM Core Level 3 (2004) 特性。

它應該控制瀏覽器是否應該為 DOM 操作拋出錯誤異常。

替代方案:

JavaScript "use strict"

實例

返回文檔的 DOM 錯誤設置:

document.strictErrorChecking;

親自試一試

語法

返回 strictErrorChecking:

document.strictErrorChecking

設置 strictErrorChecking:

document.strictErrorChecking = true|false

返回值

類型 描述
布爾值

如果 strictErrorChecking 開啟,則為 true。

在所有新瀏覽器中均返回 undefined。