?? onerrorexample4.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 + -