$(document).keydown(function (event) { if (event.keyCode == 13) { $('form').each(function () { event.preventDefault(); }); } });