Form not submitting when pressing enter

后端 未结 6 1063
长发绾君心
长发绾君心 2020-12-15 03:11

I have the following HTML/JS/jQuery Code. This code represents a login form that is presented modally to the user to allow them to login. The problem is, when I hit enter, t

6条回答
  •  春和景丽
    2020-12-15 04:02

    If you have correct input-submit-button but use (click) event on that button, it will not trigger it on enter. It will submit form but not trigger click event on button, obviously. Putting functionality to form itself and it's submit event will make it work.

提交回复
热议问题