throw
明示的に例外を発生させ指定された情報/メッセージ等をcatch()のパラメータとして渡します。
構文
throw 情報
例文
<html> <head> <title>throw</title> </head> <body> <script type="text/javascript"><!-- try { a = 123; throw "凡ミス...!?"; }catch(e){ document.write("Error = "+e); } // --></script> </body> </html>
関連記事
- with
- while
- var
- try
- this
- switch
- return
- new
- if
- function
- finally
- else
- do
- delete
- default
- continue
- const
- catch
- case
- break
- Comment / コメント / 注釈
スポンサーリンク