Home > front end >  Click event triggered by enter key
Click event triggered by enter key

Time:07-26

I've created in Javascript a click event on a <button type="submit"> in a form element. This event is also triggered when I press the enter key. Is this default html behavior?

CodePudding user response:

<input type=submit> in the form gets the automatic Enter Key behavior. This is known as an implicit form submission.

  • Related