JavaScript through try Catch catch error message code demonstration

From , 2 Years ago, written in JavaScript, viewed 99 times.
URL https://pastebin.vip/view/db5f9f42
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. var txt="";
  6. function message()
  7. {
  8. try
  9.   {
  10.   adddlert("Welcome guest!");
  11.   }
  12. catch(err)
  13.   {
  14.   txt="There was an error on this page.\n\n";
  15.   txt+="Error description: " + err.message + "\n\n";
  16.   txt+="Click OK to continue.\n\n";
  17.   alert(txt);
  18.   }
  19. }
  20. </script>
  21. </head>
  22.  
  23. <body>
  24. <input type="button" value="View message" onclick="message()" />
  25. </body>
  26.  
  27. </html>
  28.  
  29. //javascript/7843

Reply to "JavaScript through try Catch catch error message code demonstration"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website