728x90
분류 전체보기
-
[jQuery] 라디오(radio) 버튼, 체크박스(checkbox) 선택/해제 하는법jquery 2020. 5. 13. 14:47
[예 1 - 라디오버튼] HTML 사과 복숭아 Javascript $("input:radio[name='fruits']:radio[value='사과']").prop('checked', true); // 선택하기 $("input:radio[name='fruits']:radio[value='사과']").prop('checked', false); // 해제하기 [예 1 - 체크박스] HTML 사과 복숭아 포도 참외 Javascript $("checkbox[name='fruits']").prop('checked', true); // 전체선택하기 $("checkbox[name='fruits']").prop('checked', false); // 전체해제하기
-
-
-