Fed up of accidentally submitting forms with the enter key, of course you probably need to be able to do newlines in text areas.
1$("body").keypress(function(e) { 2 if (e.which == 13 && !$(e.target).is("textarea")) { 3 return false; 4 } 5});
Or if you want to be more specific.
1$('form input[type="submit"]').keypress(function(e) { 2 if (e.which == 13) { 3 return false; 4 } 5});