WON.dev
chapter06 : 키보드_이벤트 본문
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="#">
<input type="text" onkeydown="keyDownFunc()">
<div id="content"></div>
</form>
<script type="text/javascript">
function keyDownFunc(){
document.querySelector("#content").innerHTML = event.keyCode;
}
</script>
</body>
</html>
'WEB.JS > 10.EVENT_JS' 카테고리의 다른 글
chapter03 : 이벤트_객체 (0) | 2023.05.22 |
---|---|
chapter04 : 디폴트_이벤트 (0) | 2023.05.22 |
chapter05 : 마우스_이벤트 (0) | 2023.05.22 |
chapter07 : 키보드_이벤트 (0) | 2023.05.22 |
chapter : JOIN_JS (0) | 2023.05.22 |