質問編集履歴

5

誤字修正

2021/10/20 09:58

投稿

iiinnn
iiinnn

スコア8

test CHANGED
File without changes
test CHANGED
@@ -13,12 +13,6 @@
13
13
  検索してもなにも引っかからず苦戦してしまっているのでお力添えいただけると助かります。
14
14
 
15
15
  よろしくお願いいたします。
16
-
17
-
18
-
19
- 追記
20
-
21
- ![イメージ説明](21452e265627f88dd7589d0e282b4b2b.png)
22
16
 
23
17
 
24
18
 
@@ -55,32 +49,6 @@
55
49
  <link rel="stylesheet" href="index.css">
56
50
 
57
51
  </head>
58
-
59
-
60
-
61
- <header>
62
-
63
- <div>メニュー</div>
64
-
65
- <div class="menu">
66
-
67
- <nav>
68
-
69
- <ul>
70
-
71
- <li>〇</li>
72
-
73
- <li>〇</li>
74
-
75
- <li class="cloer">〇</li>
76
-
77
- </ul>
78
-
79
- </nav>
80
-
81
- </div>
82
-
83
- </header>
84
52
 
85
53
 
86
54
 
@@ -130,38 +98,6 @@
130
98
 
131
99
 
132
100
 
133
-
134
-
135
-
136
-
137
- <header>
138
-
139
- <div>好きな食べ物</div>
140
-
141
- <div class="menu">
142
-
143
- <nav>
144
-
145
- <ul>
146
-
147
- <li>〇</li>
148
-
149
- <li>〇</li>
150
-
151
- <li>〇</li>
152
-
153
- </ul>
154
-
155
- </nav>
156
-
157
- </div>
158
-
159
- </header>
160
-
161
-
162
-
163
-
164
-
165
101
  <body>
166
102
 
167
103
  <script src="index.js"></script>
@@ -187,52 +123,6 @@
187
123
  </body>
188
124
 
189
125
  </html>
190
-
191
- ```
192
-
193
-
194
-
195
- ### index.css
196
-
197
-
198
-
199
- ```
200
-
201
- header {
202
-
203
- background-color: rgb(118, 169, 179);
204
-
205
- display: flex; /*〇右寄せ 2行目にいく*/
206
-
207
- }
208
-
209
-
210
-
211
- .menu {
212
-
213
- margin:0 0 0 auto; /*〇右寄せ 3行目にいく*/
214
-
215
- padding: 0 16px; /*ヘッダー左 間隔*/
216
-
217
- }
218
-
219
-
220
-
221
- ul {
222
-
223
- display: flex; /*〇横並び*/
224
-
225
- list-style: none; /*・*/
226
-
227
- }
228
-
229
-
230
-
231
- .cloer{
232
-
233
- color: rgb(33, 99, 126);
234
-
235
- }
236
126
 
237
127
  ```
238
128
 

4

ページの追加

2021/10/20 09:58

投稿

iiinnn
iiinnn

スコア8

test CHANGED
File without changes
test CHANGED
@@ -16,18 +16,6 @@
16
16
 
17
17
 
18
18
 
19
- ![イメージ説明](e0a715beda3f08ee752262b3ec9d48cf.png)
20
-
21
-
22
-
23
- ![イメージ説明](21f85abc9ee67ae5ea69e467d81b36f3.png)
24
-
25
-
26
-
27
- ![イメージ説明](f84d8f60880e84e5118fc316a3ab78f7.png)
28
-
29
-
30
-
31
19
  追記
32
20
 
33
21
  ![イメージ説明](21452e265627f88dd7589d0e282b4b2b.png)
@@ -289,13 +277,3 @@
289
277
 
290
278
 
291
279
  ```
292
-
293
-
294
-
295
- ### 参考サイト
296
-
297
- ```
298
-
299
- https://favorite-foods-app.herokuapp.com/foods?
300
-
301
- ```

3

情報追加

2021/10/19 04:01

投稿

iiinnn
iiinnn

スコア8

test CHANGED
File without changes
test CHANGED
@@ -28,6 +28,10 @@
28
28
 
29
29
 
30
30
 
31
+ 追記
32
+
33
+ ![イメージ説明](21452e265627f88dd7589d0e282b4b2b.png)
34
+
31
35
 
32
36
 
33
37
 
@@ -254,14 +258,36 @@
254
258
 
255
259
  ```
256
260
 
261
+
262
+
257
263
  function changeAction(){
258
264
 
265
+ let food = "apple"; //変数代入
266
+
267
+
268
+
269
+ fetch('~~~',{
270
+
271
+ method: "POST",
272
+
259
- var formObject = document.getElementById('formId');
273
+ body: '{"food":"' + food + '"}',
274
+
260
-
275
+ mode: "cors",
276
+
277
+ headers: new Headers({
278
+
261
- formObject.action = "https://favorite-foods-app.herokuapp.com/foods";
279
+ 'Content-Type': 'application/json',
280
+
281
+ 'Authorization': 'Bearer ~~~',
282
+
283
+ }),
284
+
285
+ }).then(x=>console.log(x))
262
286
 
263
287
  }
264
288
 
289
+
290
+
265
291
  ```
266
292
 
267
293
 

2

修正

2021/10/19 01:42

投稿

iiinnn
iiinnn

スコア8

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
 
30
30
 
31
- ![イメージ説明](9510d5a49d3e616bf744253f0ffe83a5.png)
31
+
32
32
 
33
33
 
34
34
 

1

参考サイトの追加

2021/10/08 01:51

投稿

iiinnn
iiinnn

スコア8

test CHANGED
File without changes
test CHANGED
@@ -263,3 +263,13 @@
263
263
  }
264
264
 
265
265
  ```
266
+
267
+
268
+
269
+ ### 参考サイト
270
+
271
+ ```
272
+
273
+ https://favorite-foods-app.herokuapp.com/foods?
274
+
275
+ ```