Javatpoint Logo
Javatpoint Logo

jQuery keypress()

The jQuery keypress () event is occurred when a keyboard button is pressed down. This event is similar to keydown() event. The keypress() method is executed or attach a function to run when a keypress() event occurs.


It triggers the keypress event for selected elements.

It adds a function to the keypress event.

Parameters of jQuery keypress() event

Parameter Description
Function It is an optional parameter. It is executed itself when the keypress event is triggered.

Example of jQuery keypress() event

Let's take an example to demonstrate jQuery keypress() event.

Test it Now


Write something:

Keypresses: 0

Next TopicjQuery keyup()

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA