jQuery keyup | How to use keyup event in jquery with example

jQuery keyup event

The keyup event is triggered after a key is released in the keyboard. The keyup() method will be used to perform any action or run a function as keyup event occurs in your web document.

Note that the keyup event returns same values for lowercase and uppercase letters, whereas keypress returns different for ‘a’ and ‘A’, for example.

Syntax of keyup event

Following is the general syntax of using the keyup jQuery method:


Where function is optional, to execute as keyup event occurs.

Running example of the keyup event

The example below shows when a key (from your keyboard) is released, and the keyup event occurs, the keyup() method will capture the event and throw an alert with ASCII value of the pressed key.

jQuery keyup

Experience this example online

Related : keydown() event | keypress() event

Was this article helpful?

Related Articles

Leave A Comment?