Cute Happy Ghost
본문 바로가기
Front/Javascript·Jquery

체크박스 이벤트

by JENN_tech7 2021. 7. 8.
728x90
SMALL

javascript

$(document).ready(
			function() {

				 $("#consult").change(function(){
				        if($("#consult").is(":checked")){
				        	$('#hiddenSpace2').css('display','none');
				        }else{
				        	$('#hiddenSpace2').css('display','block');
				        }
				    });
			});

 

 

 

 

jsp

<dl class="row col-w-2">
					<dt><b class="redFont">*</b>근무기간</dt>
					<dd>
					<span class="label-w">
					<label class="label-w" for="consult">
						<input type="checkbox" id="consult" value="true" name="consult">
						<span>협의</span>
					</label>
					</span>
					<span id="hiddenSpace2">
						<input type="text" id="first_time_join" name="first_time_join" data-range="false"	data-view="years" data-language="ko"	class="text-input datepicker-here" placeholder="시작일 예:2022-01-01"title="시작일" autocomplete="off"  > &nbsp; ~&nbsp; 
			 			<input type="text" id="last_time_join" name="last_time_join" data-range="false"	data-view="years" data-language="ko"	class="text-input datepicker-here" placeholder="종료일 예:2022-01-01"title="종료일" autocomplete="off"  >
					</span>
					</dd>
				</dl>

 

 

 

728x90
LIST

'Front > Javascript·Jquery' 카테고리의 다른 글

제이쿼리 선택자에 변수넣어서 아이디찾기  (0) 2021.11.03
javascript 버튼클릭 이벤트  (0) 2021.11.02
버튼클릭 시 disabled 설정,해제  (0) 2021.02.10
Each  (0) 2020.12.13
manipulation  (0) 2020.12.13

댓글