jQuery keydown() method

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
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment