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?
Asked
Active
Viewed 271 times
0
Steven Koelma
- 3
- 2
-
it is default html behaviour for `form` element – GrafiCode Jul 26 '22 at 09:22
-
if you press Enter in the textbox or input field of the following – Jul 26 '22 at 09:22
-
Does this answer your question? [Prevent form submission on Enter key press](https://stackoverflow.com/questions/905222/prevent-form-submission-on-enter-key-press) – sm3sher Jul 26 '22 at 09:24
1 Answers
0
<input type=submit> in the form gets the automatic Enter Key behavior. This is known as an implicit form submission.
Sahithi Reddy
- 26
- 4