0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

JavaScript ハンズオンpart3

Posted at

イントロダクション

JavaScriptハンズオンpart1,2閲覧いただきありがとうございます!
この記事では、以下を参考記事等を活用しながらJavaScriptのハンズオンした内容をまとめます。
書籍『改訂版 演習 Webプログラミング入門』

目次

  1. confirmメソッド(sample28.html)

1. confirmメソッド(sample28.html)

書籍『改訂版 演習 Webプログラミング入門』4-2-3例題28のsample28.htmlを作成します。

<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>confirm</title>
</head>
<script>
window.confirm("よろしいですか?");
</script>
<body>
</body>
</html>

以下のWebページが作成されます!
image.png

説明:

  • confirmメソッド
    window.confirm("確認ダイアログボックスメッセージ")
    意味:確認ダイアログボックスを表示します。()内の値が確認メッセージとして表示されます。
    メソッドは以下のような記述をします。
    オブジェクト.メソッド(値)
    window.confirm("よろしいですか?");
    windowがオブジェクトで、confirmがメソッドにあたります。

まとめ

最後までご覧いただきありがとうございます!!confirmメソッドに取り組んでみました!次回はwriteメソッドについて学んでいきます!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?