HTML - DOM 文件 strictErrorChecking 屬性



HTML DOM 文件 strictErrorChecking 屬性用於確定文件是否強制執行嚴格的錯誤檢查。這是一個已棄用的屬性。它返回一個布林值,嚴格錯誤檢查開啟時為 true,否則為 false。

語法

設定 strictErrorChecking
document.strictErrorChecking=true|false;
獲取 strictErrorChecking
document.strictErrorChecking;

返回值

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

HTML DOM 文件 'strictErrorChecking' 屬性示例

這是一個獲取返回 undefined 的 strictErrorChecking 屬性的示例。

<!DOCTYPE html>
<html lang="en">
<head>
    <title>
        HTML DOM document strictErrorChecking Property
    </title>
</head>
<body>
    <button onclick="fun()">
        Click me
    </button>
    <p id="type"></p>
    <script>
        function fun() {
            let x = document.strictErrorChecking;
            document.getElementById("type").innerHTML = x;
        }
    </script>
</body>
</html>

支援的瀏覽器

屬性 Chrome Edge Firefox Safari Opera
strictErrorChecking
html_dom_document_reference.htm
廣告