質問編集履歴

4

修正

2021/10/24 07:51

投稿

KKsall
KKsall

スコア25

test CHANGED
File without changes
test CHANGED
@@ -460,7 +460,7 @@
460
460
 
461
461
  ```ここに言語を入力
462
462
 
463
- const prevBtns = document.querySelectorAll(".btn-prev");
463
+ const prevBtns = document.querySelectorAll(".btn-prev");
464
464
 
465
465
  const nextBtns = document.querySelectorAll(".btn-next");
466
466
 
@@ -474,13 +474,13 @@
474
474
 
475
475
 
476
476
 
477
- nextBtns.forEach(btn =>{
477
+ nextBtns.forEach((btn) =>{
478
478
 
479
479
  btn.addEventListener("click", () =>{
480
480
 
481
481
  formStepsNum++;
482
482
 
483
- updateForemSteps();
483
+ updateFormSteps();
484
484
 
485
485
  });
486
486
 
@@ -488,19 +488,37 @@
488
488
 
489
489
 
490
490
 
491
+ prevBtns.forEach((btn) =>{
492
+
493
+ btn.addEventListener("click", () =>{
494
+
495
+ formStepsNum--;
496
+
497
+ updateFormSteps();
498
+
499
+ });
500
+
501
+ });
502
+
503
+
504
+
505
+
506
+
491
- function updateForemSteps(){
507
+ function updateFormSteps(){
492
-
493
-
494
-
508
+
509
+
510
+
495
- formSteps.forEach(formStep =>{
511
+ formSteps.forEach((formStep) =>{
496
512
 
497
513
  formStep.classList.contains("form-step-active") &&
498
514
 
499
- formStep.classList.remove("form-step-active")
515
+ formStep.classList.remove("form-step-active");
500
-
516
+
501
- })
517
+ });
502
-
518
+
519
+
520
+
503
- formSteps[formStepsNum].classList.add("form-step-active")
521
+ formSteps[formStepsNum].classList.add("form-step-active");
504
522
 
505
523
  }
506
524
 

3

修正

2021/10/24 07:51

投稿

KKsall
KKsall

スコア25

test CHANGED
File without changes
test CHANGED
@@ -16,6 +16,12 @@
16
16
 
17
17
 
18
18
 
19
+ HTMLすべて
20
+
21
+ https://codepen.io/boo-jp/pen/VwzPzKW
22
+
23
+
24
+
19
25
  イメージ画像
20
26
 
21
27
  ![イメージ説明](cb80610fd39795e64b9e145a1c1aa641.png)

2

修正

2021/10/23 18:39

投稿

KKsall
KKsall

スコア25

test CHANGED
File without changes
test CHANGED
@@ -212,6 +212,22 @@
212
212
 
213
213
 
214
214
 
215
+ <div class="c-lead mt-small">
216
+
217
+ <button type="submit" class="btn-next genric-btn p-genric-btn--primary mt-small u-has-display-block">次へ<i class="btn-ph-caret-right ph-caret-right"></i>
218
+
219
+ </button>
220
+
221
+ </div>
222
+
223
+ <div class="c-lead mt-small">
224
+
225
+ <button type="submit" disabled class="js-button c-genric-btn p-genric-btn--secondary u-default-border mt-small u-has-display-block">ここまでを保存する
226
+
227
+ </button>
228
+
229
+ </div>
230
+
215
231
 
216
232
 
217
233
  <div class="form-step">
@@ -236,22 +252,6 @@
236
252
 
237
253
 
238
254
 
239
- <div class="c-lead mt-small">
240
-
241
- <button type="submit" class="btn-next genric-btn p-genric-btn--primary mt-small u-has-display-block">次へ<i class="btn-ph-caret-right ph-caret-right"></i>
242
-
243
- </button>
244
-
245
- </div>
246
-
247
- <div class="c-lead mt-small">
248
-
249
- <button type="submit" disabled class="js-button c-genric-btn p-genric-btn--secondary u-default-border mt-small u-has-display-block">ここまでを保存する
250
-
251
- </button>
252
-
253
- </div>
254
-
255
255
 
256
256
 
257
257
  ```

1

修正

2021/10/23 15:58

投稿

KKsall
KKsall

スコア25

test CHANGED
File without changes
test CHANGED
@@ -16,6 +16,12 @@
16
16
 
17
17
 
18
18
 
19
+ イメージ画像
20
+
21
+ ![イメージ説明](cb80610fd39795e64b9e145a1c1aa641.png)
22
+
23
+
24
+
19
25
  ```ここに言語を入力
20
26
 
21
27
  function cancelsubmit() {