This topic is locked

Assing ENTER to a Button

9/13/2016 7:04:20 AM
PHPRunner General questions
I
Ivan van Oosterhout author

Hello all,
I have a Button Called PRINT and when the page is loaded i want to focus the Button and when i press enter on my keyboard, the button action starts.
I suppose this will be done with some code in the JavaScript Onload Event?
Can someone advice me?
Kind regards,

Sergey Kornilov admin 9/13/2016

Check this for inspiration:

http://stackoverflow.com/questions/979662/how-to-detect-pressing-enter-on-keyboard-using-jquery
Yes, this code needs to be added to Javascript OnLoad event.