<html> <head> <title></title> </head> <body> <script language="JavaScript"> <!-- function a(){ var a; try{ a = d;// bは存在しない alert("アラート"); }catch(e){ alert("キャッチに移動しています"); } } // --> </script> <input type="button" value="submit" onclick="a();"> </body></html>
<html> <head> <title></title> </head> <body> <script language="JavaScript"> <!-- function b(){ var a; try{ a = z;// zは存在しない alert("アラート"); }catch(e){ alert(e.number); alert(e.description); } } // --> </script> <input type="button" value="submit" onclick="b();"> </body></html>
<html> <head> <title></title> </head> <body> <script type="text/javascript"> <!-- function c(){ var a; try{ a = y;// yは存在しない alert("アラート"); }catch(e){ alert(e.stack); } } // --> </script> <input type="button" value="submit" onclick="c();"> </body></html>