Javascript examples for DOM Event:onkeydown
Handle document key down event
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from www . ja v a2 s . c o m function KeyPress(e) { var evtobj = window.event? event : e if (evtobj.keyCode == 90 && evtobj.ctrlKey) console.log("Ctrl+z"); } document.onkeydown = KeyPress; } </script> </head> <body> </body> </html>