Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- restapi란?
- red hat mysql
- linux mysql설치
- NULL
- Java정규표현식
- linux dump
- restapi ajax
- fullcalenda
- fullcalenda 일정추가
- Linux
- 비밀번호변경로직
- IP
- red hat db
- linux db설치
- fullcalenda 추가
- java비밀번호
- 패킷
- Java
- linux dump하는법
- fullcalenda 캘린더
- 정규표현식
- TCP
- fullcalenda 일정수정
- select
- fullcalenda 수정
- fullcalenda 일정
- linux 데이터베이스
- red hat linux mysql
- fullcalenda 사용법
- fullcalenda 등록
Archives
- Today
- Total
무마니
자바스크립트 radio버튼 선택해제(클릭해제) 만들기 본문
$("input[type=radio]").each(function(){
var chk = $(this).is(":checked");
var name = $(this).attr('name'); <- 여기 radio name값 넣으면 끝
if(chk == true) $("input[name='"+name+"']").data("previous",$(this).val());
});
$("input[type=radio]").click(function(){
var pre = $(this).data("previous");
var chk = $(this).is(":checked");
var name = $(this).attr('name');
if(chk == true && pre == $(this).val()){
$(this).prop('checked',false);
$("input[name='"+name+"']").data("previous",'');
}else{
if(chk == true) $("input[name='"+name+"']").data("previous",$(this).val());
}
});
반응형
'백엔드 개발자 > JavaScript' 카테고리의 다른 글
Java 많이쓰는 정규표현식 (0) | 2023.05.24 |
---|---|
prop, attr 대해서 알아보자 (0) | 2023.05.01 |
select 선택한 option값 controller로 보내서 처리하기 (0) | 2023.04.28 |
JavaScript - 가격(숫자)입력시 자동 , 찍기 (0) | 2023.04.19 |