jQuery keydown() method

Definition

Use the jQuery keydown() method to fire the keydown event i.e. an event gets fired when a keyboard key is pressed down.

Syntax

The following is the syntax,

The following is the parameter for the keydown method,

  • func: When the keydown event is fired, this function runs. This is an optional parameter.

Example

The following is the output,

On typing the values in the two input fields, the following is visible. The background color of the input fields will change,

jQuery hover() method
jQuery keypress() method
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading