jquery disable keypress

JavaScript
// turn off the enter key to stop form submitting
    jQuery(document).keypress(
        function(event){
            if (event.which == '13') {
                event.preventDefault();
            }
        }); // end disable keypress

Source

Also in JavaScript: