Error occurs before the onerror event handler (Error will not be displayed)
|
|
<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()"> </body> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
|