Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Is there a javascript event handler for the enter key? Reply To: Is there a javascript event handler for the enter key?

#238485
bearhead
Participant

You have to use an if statement to test if the enter key is pressed (jquery method):

http://codepen.io/kvana/pen/yOLBoJ

The key code for the enter key is 13, here is a pen that will help you find the code for any key on your keyboard (not my work):
http://codepen.io/Jackthomsonn/pen/memNpM