teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コードの全体図を記載しました。

2021/02/08 07:18

投稿

Junpeioasis
Junpeioasis

スコア9

title CHANGED
File without changes
body CHANGED
@@ -8,4 +8,94 @@
8
8
 
9
9
  </body>
10
10
  ```
11
- 上記コードで指定したテキストボックスに入力した文言を、アラートに表示させる方法はありますか?
11
+ 上記コードで指定したテキストボックスに入力した文言を、アラートに表示させる方法はありますか?
12
+
13
+
14
+ ちなみに、適応させたいコードの全体図はこちらです。
15
+
16
+ ```html
17
+ <!DOCTYPE html>
18
+ <html>
19
+ <head>
20
+ <meta charset="UTF-8">
21
+ <title>値の取得</title>
22
+ <link rel="stylesheet" type="text/css" href="base.css">
23
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
24
+ <script>
25
+ $(function(){
26
+ // ここに処理を記述//
27
+
28
+ });
29
+ </script>
30
+ </head>
31
+ <body>
32
+ <input type="text" id="value">
33
+ <input type="button" id="button" value="ボタン">
34
+
35
+ </body>
36
+ </html>
37
+ ```
38
+
39
+ ```css
40
+ @charset "UTF-8";
41
+ /* reset */
42
+ body, h1, h2, h3, h4, h5, h6, p, address,
43
+ ul, ol, li, dl, dt, dd, img, form, table, tr, th, td {
44
+ margin: 0;
45
+ padding: 0;
46
+ border: none;
47
+ font-style: normal;
48
+ font-weight: normal;
49
+ font-size: 100%;
50
+ text-align: left;
51
+ list-style-type: none;
52
+ border-collapse: collapse;
53
+ }
54
+
55
+ textarea { font-size: 100%; vertical-align:middle;}
56
+ img { border-style: none; display: block; }
57
+ hr { display: none; }
58
+ em{font-style: normal}
59
+ input{line-height:auto;vertical-align:middle;}
60
+ strong.more{color:#c30}
61
+ a{text-decoration: none;}
62
+
63
+ html {
64
+
65
+ }
66
+
67
+ body {
68
+ font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック',sans-serif;
69
+ }
70
+
71
+ * {
72
+ -webkit-box-sizing: border-box;
73
+ -moz-box-sizing: border-box;
74
+ -o-box-sizing: border-box;
75
+ -ms-box-sizing: border-box;
76
+ box-sizing: border-box;
77
+ }
78
+
79
+ /* 上の部分は気にせずここから書く */
80
+ #wrapper {
81
+ display: flex;
82
+ justify-content: center;
83
+ height: 100vh;
84
+ align-items: center;
85
+ }
86
+
87
+ #button {
88
+ margin: 0 0px;
89
+ width: 55px;
90
+ height: 25px;
91
+ background-color: #f0f0f0;
92
+ cursor: pointer;
93
+ }
94
+
95
+ #button p {
96
+ line-height: 180px;
97
+ font-size: 30px;
98
+ text-align: center;
99
+ }
100
+
101
+ ```