<script type="text/javascript"> var presskey = ''; function keyhook_callback (c) { // 키값이 null이면 callback function을 초기화 한다. if ( c === null || c === '\r' || c === '\n' ) { if ( presskey.length > 0 ) alert (presskey); presskey = ''; document.getElementById ('kval') .innerHTML = 'value of key'; return; } if ( presskey.length == 0 && c.match (/[^0-9]/) ) { if ( c !== ' ' ) // space는 통과 시키자!! alert (c); } else { if ( c !== ' ' ) // space는 통과 시키자!! return; presskey += c; document.getElementById ('kval') .innerHTML = presskey; } return; } OJ.Keyhook.catches (keyhook_callback); </script>