/ Published in: jQuery
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!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>