loading...

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

FULL DISCUSSION
 

Hi,

onkeypress is only triggered for the 'active' field when a key is pressed.
You need to enable your element to receive focus. The trick is to add attr tabindex to #gameEvent.
(stackoverflow.com/questions/148361...

 
code of conduct - report abuse