1//jQuery detect user pressing enter
2$(document).on('keypress',function(e) {
3 if(e.which == 13) {
4 alert('User pressed Enter!');
5 }
6});
1$(document).on('keypress',function(e) {
2 if(e.which == 13) {
3 alert('You pressed enter!');
4 }
5});