.keypress() Event

Syntax

$(selector).keypress(function)

Description

".keypress()" event binds a function to an event on a element when gets triggered. Consider the below example where the keypress event is counted whenever you press a enter a key.

Example Code

Result:


Enter Text:

Keypress Event is Triggered: 0 Times



Ask Questions

Ask Question