|
|
|
14년 전
|
조회 1,248
|
|
|
|
14년 전
|
조회 1,592
|
|
|
|
14년 전
|
조회 1만
|
|
|
|
14년 전
|
조회 1,124
|
|
|
|
14년 전
|
조회 930
|
|
|
|
14년 전
|
조회 1,645
|
|
|
|
14년 전
|
조회 1,687
|
|
|
|
14년 전
|
조회 860
|
|
|
|
14년 전
|
조회 963
|
|
|
|
14년 전
|
조회 777
|
|
|
|
14년 전
|
조회 2,407
|
|
|
|
14년 전
|
조회 567
|
|
|
|
14년 전
|
조회 720
|
|
|
|
14년 전
|
조회 1,779
|
|
|
|
14년 전
|
조회 2,061
|
|
|
|
14년 전
|
조회 508
|
|
|
|
14년 전
|
조회 892
|
|
|
|
14년 전
|
조회 668
|
|
|
|
14년 전
|
조회 733
|
|
|
관리자
|
14년 전
|
조회 928
|
|
|
|
14년 전
|
조회 746
|
|
|
|
14년 전
|
조회 646
|
|
|
|
14년 전
|
조회 468
|
|
|
|
14년 전
|
조회 438
|
|
|
|
14년 전
|
조회 670
|
|
|
|
14년 전
|
조회 815
|
|
|
|
14년 전
|
조회 633
|
|
|
|
14년 전
|
조회 618
|
|
|
|
14년 전
|
조회 2,432
|
|
|
|
14년 전
|
조회 938
|
|
|
|
14년 전
|
조회 1,089
|
|
|
|
14년 전
|
조회 1,067
|
|
|
|
14년 전
|
조회 1,508
|
|
|
|
14년 전
|
조회 1,900
|
|
|
|
14년 전
|
조회 595
|
|
|
|
14년 전
|
조회 762
|
|
|
|
14년 전
|
조회 1,807
|
|
|
|
14년 전
|
조회 797
|
|
|
관리자
|
14년 전
|
조회 2,094
|
|
|
|
14년 전
|
조회 580
|
|
|
관리자
|
14년 전
|
조회 783
|
|
|
|
14년 전
|
조회 901
|
|
|
|
14년 전
|
조회 2,013
|
|
|
|
14년 전
|
조회 833
|
|
|
|
14년 전
|
조회 3,194
|
|
|
|
14년 전
|
조회 962
|
|
|
|
14년 전
|
조회 488
|
|
|
|
14년 전
|
조회 825
|
|
|
|
14년 전
|
조회 676
|
|
|
관리자
|
14년 전
|
조회 1,356
|
|
|
|
14년 전
|
조회 528
|
|
|
|
14년 전
|
조회 640
|
|
|
|
14년 전
|
조회 685
|
|
|
|
14년 전
|
조회 713
|
|
|
|
14년 전
|
조회 985
|
|
|
|
14년 전
|
조회 1,028
|
|
|
|
14년 전
|
조회 1,602
|
|
|
|
14년 전
|
조회 630
|
|
|
|
14년 전
|
조회 1,079
|
|
|
|
14년 전
|
조회 2,867
|
|
|
|
14년 전
|
조회 791
|
|
|
|
14년 전
|
조회 744
|
|
|
|
14년 전
|
조회 1,180
|
|
|
|
14년 전
|
조회 1,175
|
|
|
|
14년 전
|
조회 2,017
|
|
|
|
14년 전
|
조회 1,226
|
|
|
|
14년 전
|
조회 598
|
|
|
|
14년 전
|
조회 550
|
|
|
|
14년 전
|
조회 445
|
|
|
|
14년 전
|
조회 664
|
|
|
|
14년 전
|
조회 2,175
|
|
|
|
14년 전
|
조회 611
|
|
|
|
14년 전
|
조회 638
|
|
|
|
14년 전
|
조회 729
|
|
|
|
14년 전
|
조회 935
|
|
|
|
14년 전
|
조회 578
|
|
|
관리자
|
14년 전
|
조회 857
|
|
|
관리자
|
14년 전
|
조회 1,425
|
|
|
|
14년 전
|
조회 659
|
|
|
|
14년 전
|
조회 967
|
|
|
|
14년 전
|
조회 439
|
|
|
|
14년 전
|
조회 504
|
|
|
|
14년 전
|
조회 983
|
|
|
관리자
|
14년 전
|
조회 1,326
|
|
|
|
14년 전
|
조회 1,396
|
|
|
관리자
|
14년 전
|
조회 871
|
|
|
관리자
|
14년 전
|
조회 799
|
|
|
|
14년 전
|
조회 1,327
|
|
|
|
14년 전
|
조회 843
|
|
|
관리자
|
14년 전
|
조회 3,936
|
|
|
관리자
|
14년 전
|
조회 1,869
|
|
|
|
14년 전
|
조회 673
|
|
|
|
14년 전
|
조회 597
|
|
|
|
14년 전
|
조회 3,541
|
|
|
|
14년 전
|
조회 4,225
|
|
|
|
14년 전
|
조회 965
|
|
|
관리자
|
14년 전
|
조회 1,160
|
|
|
|
14년 전
|
조회 4,390
|
|
|
|
14년 전
|
조회 1,202
|
|
|
|
14년 전
|
조회 992
|
댓글 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());
});