Windowクラスのalert()を使って、簡単なメッセージのダイアログを表示します。
目次
種類
Windowクラスのメソッド
機能
ショートメッセージとOKボタンのダイアログを表示。
構文
Window.alert (message[, title, errorIcon]);
- message
- ダイアログに表示するメッセージ
- title
- オプション。
ダイアログに表示するタイトル。設定しないときは「Script Alert」。 - errorIcon
- オプション。
trueとすると、エラーアイコンを表示する。デフォルトはfalse。
サンプルコード1
Window.alert("ユーザーへのお知らせ");

サンプルコード2
Window.alert("タイトルをつけました。", "タイトル文字");

サンプルコード3
Window.alert("エラーアイコン", "タイトル文字", true);
