"자바스크립트 onkeyup 이벤트"의 두 판 사이의 차이

(새 문서: ;자바스크립트 onkeyup 이벤트 ;window.onkeyup ==소스코드== <source lang='html5'> <!DOCTYPE html> <meta charset="utf-8" /> <form name='key_form'> <input type='text' name='...)
 
잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 3명의 중간 판 5개는 보이지 않습니다)
3번째 줄: 3번째 줄:


==소스코드==
==소스코드==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<!DOCTYPE html>
<!DOCTYPE html>
<meta charset="utf-8" />
<meta charset="utf-8" />
17번째 줄: 17번째 줄:
}
}
</script>
</script>
</source>
</syntaxhighlight>
 
==예제==
* http://jmnote.com/js/onkeyup.php


==같이 보기==
==같이 보기==
28번째 줄: 25번째 줄:
*[[자바스크립트 onkeydown]]
*[[자바스크립트 onkeydown]]


[[분류: 자바스크립트]]
[[분류:JavaScript]]
[[분류: 이벤트]]
[[분류:이벤트]]
[[분류: Window]]
[[분류:Window]]

2020년 11월 2일 (월) 02:51 기준 최신판

자바스크립트 onkeyup 이벤트
window.onkeyup

1 소스코드[ | ]

<!DOCTYPE html>
<meta charset="utf-8" />
<form name='key_form'>
<input type='text' name='key_str' /><br>
<input type='text' name='key_code' /><br>
<input type='reset'/>
</form>
<script>
window.onkeyup = function() {
  key_form.key_code.value += event.keyCode+';';
  key_form.key_str.value += String.fromCharCode(event.keyCode)+';';
}
</script>

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}