...
jQuery, Tutorials

Submit form when hitting enter using jquery

23 January 2019

Submit form when hitting enter using jquery.Submit HTML form when enter key press. For this we need to write script for form submitted through form id when enter key click event is fired.

<script>
$(document).ready(function() {
    $(document).keyup(function(event) {
        if (event.keyCode == 13) {
         $("#myForm").submit();
        }
    })
});
</script>

Leave a Comments