Posts

Showing posts with the label disable enter key

how to prevent enter key submitting form

Name : Emai : <script>  $(document).keypress(function(e) {             if (e.which == 13) {             var $targ = $(e.target);             if (!$targ.is("textarea") && !$targ.is(":button,:submit")) {                 var focusNext = false;                 $(this).find(":input:visible:not([disabled],[readonly]), a").each(function() {                     if (this === e.target) {                         focusNext = true;                     }                     else if (focusNext) {                       ...