Develop

[js] 키보드 아스키 코드 확인하는 간단한 소스

by hooni posted Apr 23, 2003
?

Shortcut

PrevPrev Article

NextNext Article

ESCClose

Larger Font Smaller Font Up Down Go comment Print
<HTML> 
<HEAD> 
<script> 
<!-- 
function handlePress(e) { 
  var whichCode = (window.Event) ? e.which : e.keyCode; 
  alert("다음과 같은 문자를 누르셨습니다: " + String.fromCharCode(whichCode)); 
//--> 
</script> 
</HEAD> 
<BODY onKeyPress="handlePress(event)"> 
아무 키보드나 눌러보세요... 
</BODY> 
</HTML>