Home >Web Front-end >JS Tutorial >jquery carriage return event implementation code_jquery
Example, usage of jquery keyboard event and enter key event.
// Keyboard events
1. keydown()
The keydown event will be triggered when the keyboard is pressed.
2. keyup()
The keyup event will be triggered when the key is pressed. Triggered when released, that is, the event after you press the keyboard and lift it up
3. keypress()
The keypress event will be triggered when the key is tapped. We can understand it as pressing and lifting the same key
Note: Due to the different keyboard press events of browsers, some events may not operate normally, so it is recommended to operate the keydown event!
Jquery monitors keys and presses the Enter key to trigger a method