|
|
|
12-01-08
|
조회 3,061
|
|
|
|
12-01-07
|
조회 3,667
|
|
|
|
12-01-07
|
조회 3,123
|
|
|
|
12-01-07
|
조회 3,031
|
|
|
|
12-01-07
|
조회 3,000
|
|
|
|
12-01-07
|
조회 5,255
|
|
|
|
12-01-06
|
조회 2,783
|
|
|
|
12-01-06
|
조회 3,496
|
|
|
|
12-01-06
|
조회 2,987
|
|
|
|
12-01-06
|
조회 2,941
|
|
|
|
12-01-06
|
조회 2,946
|
|
|
|
12-01-06
|
조회 5,651
|
|
|
|
12-01-06
|
조회 3,700
|
|
|
|
12-01-06
|
조회 2,895
|
|
|
|
12-01-06
|
조회 3,020
|
|
|
|
12-01-05
|
조회 3,082
|
|
|
|
12-01-05
|
조회 3,096
|
|
|
|
12-01-05
|
조회 2,807
|
|
|
|
12-01-05
|
조회 2,904
|
|
|
|
12-01-05
|
조회 3,552
|
|
|
선택이란
|
12-01-05
|
조회 5,397
|
|
|
|
12-01-04
|
조회 3,843
|
|
|
|
12-01-04
|
조회 2,836
|
|
|
|
12-01-04
|
조회 2,779
|
|
|
|
12-01-04
|
조회 3,000
|
|
|
|
12-01-04
|
조회 2,842
|
|
|
|
12-01-04
|
조회 2,921
|
|
|
|
12-01-04
|
조회 3,078
|
|
|
|
12-01-04
|
조회 2,834
|
|
|
|
12-01-04
|
조회 5,243
|
|
|
|
12-01-04
|
조회 5,112
|
|
|
|
12-01-04
|
조회 2,972
|
|
|
|
12-01-04
|
조회 3,437
|
|
|
|
12-01-04
|
조회 3,110
|
|
|
|
12-01-04
|
조회 2,933
|
|
|
|
12-01-04
|
조회 5,431
|
|
|
|
12-01-04
|
조회 4,598
|
|
|
|
12-01-04
|
조회 4,085
|
|
|
jakekwak
|
12-01-04
|
조회 3,950
|
|
|
|
12-01-04
|
조회 2,775
|
|
|
|
12-01-03
|
조회 3,667
|
|
|
|
12-01-03
|
조회 2,644
|
|
|
|
12-01-03
|
조회 2,668
|
|
|
|
12-01-03
|
조회 2,671
|
|
|
|
12-01-02
|
조회 3,167
|
|
|
|
12-01-02
|
조회 3,225
|
|
|
|
12-01-02
|
조회 4,069
|
|
|
|
12-01-02
|
조회 3,037
|
|
|
|
12-01-02
|
조회 3,255
|
|
|
|
12-01-02
|
조회 3,519
|
|
|
|
12-01-02
|
조회 3,517
|
|
|
|
12-01-01
|
조회 2,719
|
|
|
|
12-01-01
|
조회 4,195
|
|
|
|
12-01-01
|
조회 3,166
|
|
|
|
12-01-01
|
조회 3,538
|
|
|
|
11-12-31
|
조회 3,476
|
|
|
|
11-12-31
|
조회 3,808
|
|
|
|
11-12-31
|
조회 3,909
|
|
|
|
11-12-31
|
조회 3,144
|
|
|
|
11-12-31
|
조회 3,297
|
|
|
|
11-12-31
|
조회 3,733
|
|
|
|
11-12-30
|
조회 3,988
|
|
|
|
11-12-30
|
조회 3,273
|
|
|
|
11-12-30
|
조회 3,327
|
|
|
|
11-12-30
|
조회 3,970
|
|
|
|
11-12-30
|
조회 5,157
|
|
|
|
11-12-30
|
조회 4,258
|
|
|
|
11-12-30
|
조회 4,429
|
|
|
|
11-12-30
|
조회 3,893
|
|
|
|
11-12-30
|
조회 3,611
|
|
|
|
11-12-30
|
조회 3,633
|
|
|
|
11-12-30
|
조회 3,479
|
|
|
|
11-12-30
|
조회 2,672
|
|
|
|
11-12-30
|
조회 3,840
|
|
|
|
11-12-30
|
조회 7,116
|
|
|
|
11-12-29
|
조회 3,685
|
|
|
|
11-12-29
|
조회 3,368
|
|
|
|
11-12-29
|
조회 3,035
|
|
|
|
11-12-29
|
조회 3,250
|
|
|
선택이란
|
11-12-29
|
조회 3,107
|
|
|
|
11-12-28
|
조회 2,729
|
|
|
|
11-12-28
|
조회 2,876
|
|
|
|
11-12-28
|
조회 3,010
|
|
|
|
11-12-28
|
조회 2,934
|
|
|
|
11-12-28
|
조회 3,797
|
|
|
|
11-12-27
|
조회 3,155
|
|
|
선택이란
|
11-12-27
|
조회 2,921
|
|
|
|
11-12-27
|
조회 2,823
|
|
|
|
11-12-27
|
조회 2,939
|
|
|
|
11-12-26
|
조회 3,260
|
|
|
|
11-12-26
|
조회 3,159
|
|
|
|
11-12-26
|
조회 3,738
|
|
|
|
11-12-26
|
조회 3,371
|
|
|
|
11-12-26
|
조회 5,928
|
|
|
선택이란
|
11-12-25
|
조회 3,093
|
|
|
|
11-12-23
|
조회 3,644
|
|
|
|
11-12-23
|
조회 3,587
|
|
|
|
11-12-23
|
조회 5,162
|
|
|
|
11-12-23
|
조회 4,818
|
|
|
|
11-12-23
|
조회 2,907
|
댓글 1개
// 뒤쪽에 옵션 추가
$("#myselect").append("<option value='1'>Apples</option>");
$("#myselect").append("<option value='2'>After Apples</option>");
// 앞쪽에 옵션 삽입
$("#myselect").prepend("<option value='0'>Before Apples</option>");
// 옵션변경
$("#myselect").html("<option value='1'>Some oranges</option><option value='2'>More Oranges</option><option value='3'>Even more oranges</option>");
// 인덱스 위치에 따라 옵션 변경
$("#myselect option:eq(1)").replaceWith("<option value='2'>Some apples</option>");
$("#myselect option:eq(2)").replaceWith("<option value='3'>Some bananas</option>");
// 2번째 옵션 셀렉트
$("#myselect option:eq(2)").attr("selected", "selected");
// 해당 텍스트를 가진 옵션 셀렉트
$("#myselect").val("Some oranges").attr("selected", "selected");
// 해당값을 가진 옵션 셀렉트
$("#myselect").val("2");
// 선택 옵션 제거
$("#myselect option:eq(0)").remove();
// 첫번째 옵션 제거
$("#myselect option:first").remove();
// 마지막 옵션 제거
$("#myselect option:last").remove();
// 셀렉트된 옵션 텍스트 리턴
alert($("#myselect option:selected").text());
// 셀렉트된 옵션 값리턴
alert($("#myselect option:selected").val());
// 셀렉트된 인덱스 리턴
alert($("#myselect option").index($("#myselect option:selected")));
// Alternative way to get the selected item
alert($("#myselect option:selected").prevAll().size());
// Insert an item in after a particular position
$("#myselect option:eq(0)").after("<option value='4'>Some pears</option>");
// Insert an item in before a particular position
$("#myselect option:eq(3)").before("<option value='5'>Some apricots</option>");
// Getting values when item is selected
$("#myselect").change(function() {
alert($(this).val());
alert($(this).children("option:selected").text());
});