Try catch user exception
|
|
<html> <head> <title>Try Catch Example</title> <script type="text/javascript">
function addTwoNumbers(a, b) { throw new Error("Two numbers are required."); }
try { result = addTwoNumbers(90); } catch (oException) { alert(oException.message); }
</script> </head> <body> </body> </html>
|
|
|
HTML code for linking to this page:
Related in same category :
-
-
-
|