⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 onerrorexample4.htm

📁 java开发时好多地方用javascript是很方便的,看看这个,对你有好处.
💻 HTM
字号:
<html>
    <head>
        <title>OnError Example</title>
        <script type="text/javascript">
            alert("Syntax error.";
            window.onerror = function (sMessage, sUrl, sLine) {
                alert("An error occurred:\n" + sMessage + "\nURL: " + sUrl + "\nLine Number: " + sLine);
                return true;
            }
        </script>
    </head>
    <body onload="nonExistentFunction()">
        <p>The syntax error in this page occurs before the <code>onerror</code>
        event handler is assigned, therefore the browser intercepts the error
        and the custom error message isn't displayed.</p>
    </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -