How to send a form by pressing ENTER key


/ Published in: JavaScript
Save to your folder(s)

Suppose you have a login form and you want to send the form when user press enter on his keyboard and not only by clicking on the submit button.
This can be achieved capturing a specific event when the user is typing. We have to capture the keypress event and listen to trigger an action when the enter key is pressed. Example and code in the link above.

URL: http://www.barattalo.it/2010/02/16/how-to-capture-enter-key-pressed-in-a-form-javascript/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.