質問編集履歴

4

誤字修正

2018/04/17 23:25

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  ```html
26
26
 
27
- <form id="basic_form" method="get" action="----" name="----">
27
+ <form id="basic_form" method="get" action="----" name="basic_search">
28
28
 
29
29
  <input type="text" ~~>
30
30
 

3

微修正

2018/04/17 23:25

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -38,11 +38,11 @@
38
38
 
39
39
  <div id="checkbox_id">
40
40
 
41
- <input id="checkbox_id1" type="checkbox" name="codeType" value="---" >
41
+ <input type="checkbox" name="codeType" value="---" >
42
42
 
43
- <input id="checkbox_id2" type="checkbox" name="codeType" value="---" >
43
+ <input type="checkbox" name="codeType" value="---" >
44
44
 
45
- <input id="checkbox_id3" type="checkbox" name="codeType" value="---" >
45
+ <input type="checkbox" name="codeType" value="---" >
46
46
 
47
47
  </div>
48
48
 

2

修正済み

2018/04/17 23:24

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
 
17
17
  ★すみません、投稿時に少しミスをしているかもしれません。修正中です。
18
+
19
+ →修正しました。
18
20
 
19
21
 
20
22
 
@@ -36,11 +38,11 @@
36
38
 
37
39
  <div id="checkbox_id">
38
40
 
39
- <input id="checkbox_id1" type="checkbox" name="---" value="---" >
41
+ <input id="checkbox_id1" type="checkbox" name="codeType" value="---" >
40
42
 
41
- <input id="checkbox_id2" type="checkbox" name="---" value="---" >
43
+ <input id="checkbox_id2" type="checkbox" name="codeType" value="---" >
42
44
 
43
- <input id="checkbox_id3" type="checkbox" name="---" value="---" >
45
+ <input id="checkbox_id3" type="checkbox" name="codeType" value="---" >
44
46
 
45
47
  </div>
46
48
 
@@ -54,13 +56,15 @@
54
56
 
55
57
  ```js
56
58
 
57
- document.getElementById("checkbox_id").forEach(function(){
59
+ document.forms.basic_search.codeType.forEach(function(){
58
60
 
59
61
  addEventListener("change",function(){
60
62
 
61
63
  document.forms.basic_search.submit();
62
64
 
63
65
  })
66
+
67
+ });
64
68
 
65
69
 
66
70
 
@@ -71,17 +75,3 @@
71
75
  ## 現象
72
76
 
73
77
  ラジオボタンやその他のテキストボックスを変更しても、submitが実行される。
74
-
75
-
76
-
77
- なお下記のように書いても、同じくsubmitが実行されてしまいました。
78
-
79
- ```js
80
-
81
- document.getElementById("checkbox_id1").addEventListener("change",function(){
82
-
83
- document.forms.basic_search.submit();
84
-
85
- });
86
-
87
- ```

1

修正

2018/04/17 23:23

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -13,6 +13,8 @@
13
13
 
14
14
 
15
15
 
16
+
17
+ ★すみません、投稿時に少しミスをしているかもしれません。修正中です。
16
18
 
17
19
 
18
20