BY LOVE $("#tax_rate_name, #tax_rate_rate").keypress(function (event) { if (event.keyCode == 13) { event.preventDefault(); } });