質問編集履歴
1
コードの全体図を記載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -19,3 +19,183 @@
|
|
19
19
|
```
|
20
20
|
|
21
21
|
上記コードで指定したテキストボックスに入力した文言を、アラートに表示させる方法はありますか?
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
ちなみに、適応させたいコードの全体図はこちらです。
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```html
|
32
|
+
|
33
|
+
<!DOCTYPE html>
|
34
|
+
|
35
|
+
<html>
|
36
|
+
|
37
|
+
<head>
|
38
|
+
|
39
|
+
<meta charset="UTF-8">
|
40
|
+
|
41
|
+
<title>値の取得</title>
|
42
|
+
|
43
|
+
<link rel="stylesheet" type="text/css" href="base.css">
|
44
|
+
|
45
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
|
46
|
+
|
47
|
+
<script>
|
48
|
+
|
49
|
+
$(function(){
|
50
|
+
|
51
|
+
// ここに処理を記述//
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
});
|
56
|
+
|
57
|
+
</script>
|
58
|
+
|
59
|
+
</head>
|
60
|
+
|
61
|
+
<body>
|
62
|
+
|
63
|
+
<input type="text" id="value">
|
64
|
+
|
65
|
+
<input type="button" id="button" value="ボタン">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
</body>
|
70
|
+
|
71
|
+
</html>
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
```css
|
78
|
+
|
79
|
+
@charset "UTF-8";
|
80
|
+
|
81
|
+
/* reset */
|
82
|
+
|
83
|
+
body, h1, h2, h3, h4, h5, h6, p, address,
|
84
|
+
|
85
|
+
ul, ol, li, dl, dt, dd, img, form, table, tr, th, td {
|
86
|
+
|
87
|
+
margin: 0;
|
88
|
+
|
89
|
+
padding: 0;
|
90
|
+
|
91
|
+
border: none;
|
92
|
+
|
93
|
+
font-style: normal;
|
94
|
+
|
95
|
+
font-weight: normal;
|
96
|
+
|
97
|
+
font-size: 100%;
|
98
|
+
|
99
|
+
text-align: left;
|
100
|
+
|
101
|
+
list-style-type: none;
|
102
|
+
|
103
|
+
border-collapse: collapse;
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
textarea { font-size: 100%; vertical-align:middle;}
|
110
|
+
|
111
|
+
img { border-style: none; display: block; }
|
112
|
+
|
113
|
+
hr { display: none; }
|
114
|
+
|
115
|
+
em{font-style: normal}
|
116
|
+
|
117
|
+
input{line-height:auto;vertical-align:middle;}
|
118
|
+
|
119
|
+
strong.more{color:#c30}
|
120
|
+
|
121
|
+
a{text-decoration: none;}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
html {
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
body {
|
134
|
+
|
135
|
+
font-family:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック',sans-serif;
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
* {
|
142
|
+
|
143
|
+
-webkit-box-sizing: border-box;
|
144
|
+
|
145
|
+
-moz-box-sizing: border-box;
|
146
|
+
|
147
|
+
-o-box-sizing: border-box;
|
148
|
+
|
149
|
+
-ms-box-sizing: border-box;
|
150
|
+
|
151
|
+
box-sizing: border-box;
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
/* 上の部分は気にせずここから書く */
|
158
|
+
|
159
|
+
#wrapper {
|
160
|
+
|
161
|
+
display: flex;
|
162
|
+
|
163
|
+
justify-content: center;
|
164
|
+
|
165
|
+
height: 100vh;
|
166
|
+
|
167
|
+
align-items: center;
|
168
|
+
|
169
|
+
}
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
#button {
|
174
|
+
|
175
|
+
margin: 0 0px;
|
176
|
+
|
177
|
+
width: 55px;
|
178
|
+
|
179
|
+
height: 25px;
|
180
|
+
|
181
|
+
background-color: #f0f0f0;
|
182
|
+
|
183
|
+
cursor: pointer;
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
#button p {
|
190
|
+
|
191
|
+
line-height: 180px;
|
192
|
+
|
193
|
+
font-size: 30px;
|
194
|
+
|
195
|
+
text-align: center;
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
```
|