Return to Snippet

Revision: 48591
at July 5, 2011 22:00 by jobyktom


Updated Code
<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-git.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>

Revision: 48590
at July 5, 2011 22:00 by jobyktom


Initial Code
<script>$('#whichkey').bind('keydown',function(e){ 
  $('#log').html(e.type + ': ' +  e.which );
});  </script>

Initial URL


Initial Description


Initial Title
key event type and key code

Initial Tags


Initial Language
jQuery