loading...

re: Why can't I add an 'onkeydown' event to a DIV element? VIEW POST

FULL DISCUSSION
 

Why does it need to be tied to a <div>? Why don't you just make an event listener to window?

window.onkeypress = ...
 
code of conduct - report abuse