HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery Event Methods : Set the background color of an <input> field when a keyboard key is pressed down
The order of events related to the keydown event:
The keydown event occurs when a keyboard key is pressed down.
The keydown() method triggers the keydown event, or attaches a function to run when a keydown event occurs.
Trigger the keydown event for the selected elements:
Attach a function to the keydown event:
Parameter | Description |
---|---|
function | Optional. Specifies the function to run when the keydown event is triggered |