Skip to content Skip to sidebar Skip to footer

Submitting Textarea When Clicked Enter

First of all, there are many answers for this type of questions but none of them work for me because I am using multiple forms. My question is, I need a script which will submit th

Solution 1:

How about this

  $(this).closest('form').submit();

instead of this

document.getElementById('formName').submit();

In this way, only the form to which the current textarea belongs will be submitted.

Post a Comment for "Submitting Textarea When Clicked Enter"