티스토리 뷰
키 또는 마우스 이벤트의 경우이 속성은 눌러 된 특정 키 또는 버튼을 나타냅니다.
Description: For key or mouse events, this property indicates the specific key or button that was pressed.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<input id="whichkey" value="type something">
<div id="log"></div>
<script>$('#whichkey').bind('keydown',function(e){
$('#log').html(e.type + ': ' + e.which );
}); </script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<input id="whichkey" value="type something">
<div id="log"></div>
<script>
$('#whichkey').bind('mousedown',function(e){
$('#log').html(e.type + ': ' + e.which );
});
</script>
</body>
</html>
상세 설명: http://api.jquery.com/event.which/
728x90
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- React
- system.io
- 표현 언어(expression language)
- error-java
- await
- MainActor
- jstl(java standard tag library)
- java 키워드 정리
- 메이븐(maven)
- java-개발 환경 설정하기
- 진수 변환
- REST API
- 문자 자르기
- java web-mvc
- 특정 문자를 기준으로 자르기
- 스프링 프레임워크(spring framework)
- jsp 오픈 소스
- In App Purchase
- 제품 등록
- .submit()
- 스프링 프레임워크(spring framewordk)
- 스프링 시큐리티(spring security)
- docker
- nl2br
- 스프링 시큐리티(spring security)-http basic 인증
- System.Diagnostics
- java.sql
- jstl(java standard tag library)-core
- 인텔리제이(intellij)
- 람다식(lambda expression)
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함