개발/기타
[JQuery] Select Box 제어
JQuery Select Box 제어하기 1. jQuery로 선택된 값 읽기 $("#selectBox option:selected").val(); $("select[name=name]").val(); 2. jQuery로 선택된 내용 읽기 $("#selectBox option:selected").text(); 3. 선택된 위치 var index = $("#test option").index($("#test option:selected")); 4. Add options to the end of a select $("#selectBox").append("Apples"); $("#selectBox").append("After Apples"); 5. Add options to the start of a selec..
2019. 1. 16. 20:04