javascript key storke source
웹/공격 2012. 2. 20. 17:32 |http://www.davidpirek.com/blog/javascript-keystroke-listener
//keystroke listener var keyStroker = function(f, k, e){ document[e] = function(event){ var keycode; //IE hack if ( typeof event == "undefined" ) { event = window.event; } //IE different event object if ( typeof event.which == "undefined" ) { keycode = event.keyCode; } else{ keycode = event.which; } //run callback if particular key was clicked if(keycode==k){ f(); } }; }; keyStroker(function(){ //write code here }, 192, "onkeyup");