I have a very simple HTML form containing only a submit button and a text box. Is there an easy way to use a hotkey to submit this form as an alternative to clicking a button?
Thanks in advance: -)
Submit buttons may have accesskeys , but there are disadvantages . For users, it would probably be better to just press the tab key to focus the submit button, and then press enter.
"keyDown", "keyPress", JS- (JQUERY MOOTOOLS).. Ctrl + S .
JQuery . http://api.jquery.com/keypress/
Mootools . http://mootorial.com/wiki/mootorial/03-native/05-event
jQuery ( )... , "YourID" "document" ( , . , keypress , , , .
$("#YourID").keypress(function (e) { var code = (e.keyCode ? e.keyCode : e.which); // grabs keycode pressed if (code == 13) { // Code 13 is enter searchUPC(); } });