Home > Article > Web Front-end > The onkeydown event solves the need to directly submit data by pressing the Enter key_javascript skills
The login page needs to capture the user's need to press Enter to submit automatically:
Add an onkeydown event in the body to jump to the javascript before submitting the form.
Find the document as follows
The onkeydown event occurs when the user presses a keyboard key.
Syntax: onkeydown="SomeJavaScriptCode"
HTML tags that support this event;