Return to Snippet

Revision: 13055
at April 6, 2009 18:18 by wesleymacente


Initial Code
document.onkeydown = function(e){ 
          if (e == null) { // ie 
            keycode = event.keyCode; 
          } else { // mozilla 
            keycode = e.which; 
          } 
          if(keycode == 27){ // escape, close box, esc 
              //what you nedd
          } 
        };

Initial URL

                                

Initial Description

                                

Initial Title
Get key event  ESC on document

Initial Tags
javascript

Initial Language
JavaScript