質問編集履歴

1

編集・追記依頼への対応

2018/05/10 09:06

投稿

Samson818
Samson818

スコア162

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,133 @@
23
23
 
24
24
 
25
25
  ご教示ください。
26
+
27
+
28
+
29
+ やってみた事
30
+
31
+
32
+
33
+ ```ここに言語を入力
34
+
35
+ function calc()
36
+
37
+ {
38
+
39
+ for (i=0; i<9; i++) if( document.getElementById('sim' + i).checked){$('#options').slideDown();};
40
+
41
+ }
42
+
43
+ ```
44
+
45
+ ```ここに言語を入力
46
+
47
+ function calc()
48
+
49
+ {
50
+
51
+ for (i=0; i<9; i++){ if( document.getElementById('sim' + i).checked){$('#options').slideDown();};};
52
+
53
+ }
54
+
55
+ ```
56
+
57
+
58
+
59
+ ```ここに言語を入力
60
+
61
+ function calc()
62
+
63
+ {
64
+
65
+ if(document.getElementById(for (i=0; i<9; i++) 'sim' + i).checked){$('#options').slideDown();};
66
+
67
+ }
68
+
69
+ ```
70
+
71
+
72
+
73
+ ```ここに言語を入力
74
+
75
+ function calc()
76
+
77
+ {
78
+
79
+ if( document.getElementById('sim1').checked){$('#options').slideDown();};
80
+
81
+ if( document.getElementById('sim2').checked){$('#options').slideDown();};
82
+
83
+ if( document.getElementById('sim3').checked){$('#options').slideDown();};
84
+
85
+ if( document.getElementById('sim4').checked){$('#options').slideDown();};
86
+
87
+ if( document.getElementById('sim5').checked){$('#options').slideDown();};
88
+
89
+ if( document.getElementById('sim6').checked){$('#options').slideDown();};
90
+
91
+ if( document.getElementById('sim7').checked){$('#options').slideDown();};
92
+
93
+ if( document.getElementById('sim8').checked){$('#options').slideDown();};
94
+
95
+ if( document.getElementById('sim9').checked){$('#options').slideDown();};
96
+
97
+ }
98
+
99
+ ```
100
+
101
+ HTML
102
+
103
+ ```ここに言語を入力
104
+
105
+ <table class="sim_tbl">
106
+
107
+ <thead>
108
+
109
+ <tr><th colspan="2">登録数(~件迄)</th><td>1,000</td><td>3,000</td><td>6,000</td><td>9,000</td><td>12,000</td><td>15,000</td><td>20,000</td><td>30,000</td><td>30,000</td></tr>
110
+
111
+ </thead>
112
+
113
+ <tbody>
114
+
115
+ <tr><th colspan="2">基本料金</th>
116
+
117
+ <td><input type="radio" name="num" value="3000" onClick="calc()" id="sim1"><label for="sim1">3,000円</label></td>
118
+
119
+ <td><input type="radio" name="num" value="5000" onClick="calc()" id="sim2"><label for="sim2">5,000円</label></td>
120
+
121
+ <td><input type="radio" name="num" value="8000" onClick="calc()" id="sim3"><label for="sim3">8,000円</label></td>
122
+
123
+ <td><input type="radio" name="num" value="12000" onClick="calc()" id="sim4"><label for="sim4">12,000円</label></td>
124
+
125
+ <td><input type="radio" name="num" value="15000" onClick="calc()" id="sim5"><label for="sim5">15,000円</label></td>
126
+
127
+ <td><input type="radio" name="num" value="18000" onClick="calc()" id="sim6"><label for="sim6">18,000円</label></td>
128
+
129
+ <td><input type="radio" name="num" value="20000" onClick="calc()" id="sim7"><label for="sim7">20,000円</label></td>
130
+
131
+ <td><input type="radio" name="num" value="25000" onClick="calc()" id="sim8"><label for="sim8">25,000円</label></td>
132
+
133
+ <td><input type="radio" name="num" value="60000" onClick="calc()" id="sim9"><label for="sim9">60,000円</label></td>
134
+
135
+ </tr>
136
+
137
+ </tbody>
138
+
139
+ </table>
140
+
141
+
142
+
143
+ <table class="sim_tbl" id="options">
144
+
145
+ <tbody>
146
+
147
+ <-略->
148
+
149
+ </tbody>
150
+
151
+ </table>
152
+
153
+
154
+
155
+ ```