Showing
1 changed file
with
11 additions
and
3 deletions
... | @@ -6,7 +6,7 @@ $(document).ready(function () { | ... | @@ -6,7 +6,7 @@ $(document).ready(function () { |
6 | var form = $('#form'); | 6 | var form = $('#form'); |
7 | var result = $('#result'); | 7 | var result = $('#result'); |
8 | var a2=$('#a1'); | 8 | var a2=$('#a1'); |
9 | - for (i = 2; i < 861; i++) { | 9 | + for (i = 1; i < 862; i++) { |
10 | var option = $('<option>'); | 10 | var option = $('<option>'); |
11 | option.val(i).text(i+'회차'); | 11 | option.val(i).text(i+'회차'); |
12 | dropdown.append(option); | 12 | dropdown.append(option); |
... | @@ -17,7 +17,15 @@ $(document).ready(function () { | ... | @@ -17,7 +17,15 @@ $(document).ready(function () { |
17 | alert('뭔가 선택을 하세요.'); | 17 | alert('뭔가 선택을 하세요.'); |
18 | dropdown.focus(); | 18 | dropdown.focus(); |
19 | } else { | 19 | } else { |
20 | - document.getElementById("a1").src="http://lotto.kaisyu.com/api?method=get&gno="+dropdown.val()+";callback=loadlot"; | 20 | + document.getElementById("lotto_api_src").src="http://lotto.kaisyu.com/api?method=get&gno="+dropdown.val()+";callback=loadlot"; |
21 | + var lotto_parent = document.getElementById("lotto_api_data"); | ||
22 | + var lotto_child=document.getElementById("lotto_api_src"); | ||
23 | + lotto_child.remove(); | ||
24 | + child_node=document.createElement('script'); | ||
25 | + child_node.id="lotto_api_src"; | ||
26 | + lotto_parent.append(child_node); | ||
27 | + | ||
28 | + | ||
21 | 29 | ||
22 | } | 30 | } |
23 | }); | 31 | }); |
... | @@ -165,7 +173,6 @@ function count() { | ... | @@ -165,7 +173,6 @@ function count() { |
165 | } | 173 | } |
166 | 174 | ||
167 | function loadlot(a) { | 175 | function loadlot(a) { |
168 | - | ||
169 | $("#lottok").html('제 ' + a.gno + '회차 당첨 결과(' + a.gdate + ')'); // + '<br/>' + | 176 | $("#lottok").html('제 ' + a.gno + '회차 당첨 결과(' + a.gdate + ')'); // + '<br/>' + |
170 | //a.nums + a.bnum; | 177 | //a.nums + a.bnum; |
171 | a.nums[6] = a.bnum; | 178 | a.nums[6] = a.bnum; |
... | @@ -185,5 +192,6 @@ function loadlot(a) { | ... | @@ -185,5 +192,6 @@ function loadlot(a) { |
185 | $('#output' + i).addClass("c5"); | 192 | $('#output' + i).addClass("c5"); |
186 | } | 193 | } |
187 | } | 194 | } |
195 | + | ||
188 | data = a; | 196 | data = a; |
189 | } | 197 | } | ... | ... |
-
Please register or login to post a comment