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
- toFixed()
- Git
- selectoptions
- 주석이 먹히지 않을 때
- is_check
- slideUp
- index %
- FileZilla설치
- 파일질라설치오류
- ctrl+/
- hide
- excel중복체크
- FileZilla다운로드
- Excel
- 1521
- Math.floor()
- removeClass
- push오류
- 증가값
- calc.minus
- selectedIndex
- 파일질라설치
- calc.plus
- SUB함수
- Math.ceil()
- addClass
- Parent
- Math.round()
- 소스트리인증실패
- 파일질라다운로드
Archives
- Today
- Total
잡동사니에도 사랑을
[21.10.13] exam08(02_jQueryEvent) 본문
728x90
반응형
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/event.css">
</head>
<body>
<h1>focus/blur 이벤트 확인하기</h1>
<div id="input">
<input type="text">
</div>
<h2>결과</h2>
<div id="result"></div>
<script type="text/javascript"
src="http://code.jquery.com/jquery-3.6.0.min.js"></script>
<script type="text/javascript">
$(function() {
$('#input > input[type=text]').focus(function() {
$('#result').html('포커스가 들어갔습니다.');
});
$('#input > input[type=text]').blur(function() {
$('#result').html('포커스가 나왔습니다.');
});
//페이지가 열리면 자동으로 포커스 설정된다
$('#input > input[type=text]').focus();
});
</script>
</body>
</html>
728x90
반응형
'JAVA_EE > JQuery' 카테고리의 다른 글
[21.10.13] exam11(02_jQueryEvent) (0) | 2021.10.14 |
---|---|
[21.10.13] exam10(02_jQueryEvent) (0) | 2021.10.14 |
[21.10.06] exam07(02_jQueryEvent) - Key이벤트(keypress) (0) | 2021.10.07 |
[21.10.06] exam06(02_jQueryEvent) - KeyName(keyCode) (0) | 2021.10.07 |
[21.10.06] exam05(02_jQueryEvent) - Key이벤트 확인(Key를 입력하거나 Key를 계속 눌렀을 때의 이벤트 발생) (0) | 2021.10.07 |