Created
September 10, 2018 11:34
-
-
Save shohag-cse-knu/ef2c873810dd59c74d1936a1ef456491 to your computer and use it in GitHub Desktop.
Form submission when enter key is pressed in any form fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('#form_field_1,#form_field_2,#form_field_3').keypress(function(event){ | |
var keycode = (event.keyCode ? event.keyCode : event.which); | |
if(keycode == '13'){ | |
//your necessary code here | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment