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 |
Tags
- 주석이 먹히지 않을 때
- FileZilla다운로드
- hide
- Math.floor()
- Parent
- slideUp
- 1521
- excel중복체크
- Excel
- FileZilla설치
- toFixed()
- SUB함수
- Git
- 파일질라설치
- ctrl+/
- index %
- 소스트리인증실패
- removeClass
- addClass
- push오류
- calc.minus
- 파일질라설치오류
- 증가값
- selectedIndex
- Math.ceil()
- 파일질라다운로드
- is_check
- selectoptions
- Math.round()
- calc.plus
Archives
- Today
- Total
잡동사니에도 사랑을
[21.10.14] exam04(03_jQueryAttr) - 체크박스 활성화 / 비활성화, 파일 열기 본문
JAVA_EE/JQuery
[21.10.14] exam04(03_jQueryAttr) - 체크박스 활성화 / 비활성화, 파일 열기
luvforjunk 2021. 10. 14. 11:02728x90
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/event.css">
</head>
<body>
<h1>활성/비활성 구현하기</h1>
<form name="form1">
<input type="checkbox" id="upload_file_check" value="Y" />
<input type="file" id="file_finder" disabled />
</form>
<script type="text/javascript" src="http://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(function(){
$('#upload_file_check').change(function(){
var is_check = $(this).is(':checked');
$('#file_finder').prop('disabled', !is_check);
// disabled 자체가 비활성화니까 반대로(!)
});
});
</script>
</body>
</html>
[결과]
728x90
반응형