trycatchexample3.htm

来自「这是javascript高级程序设计的源码」· HTM 代码 · 共 18 行

HTM
18
字号
<html>
    <head>
        <title>Try Catch Example</title>
        <script type="text/javascript">
                try {
                    window.nonExistentFunction();
                    alert("Method completed.");
                } catch (oException) {
                    alert("An exception occurred: " + oException.message);
                } finally {
                    alert("End of try卌atch test.");
                }
        </script>
    </head>
    <body>
    </body>
</html>

⌨️ 快捷键说明

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