开发者

Form submit by enter key except in textarea in javascript?

I have this form where it submits by pressing enter key.

I want it to function except for textarea, where it should has it usual behavio开发者_开发百科r adding a new line in text-area


The default behavior is that the form doesn't submit if you press enter inside a textarea as seen in the following live demo. It simply adds a new row inside the textarea. You don't need any javascript for this. On the other hand if the the user presses enter while inside a normal textbox the form is submitted.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜