jQuery keydown() Method - CodingTag

jQuery keydown()

0 875

  • This jQuery function is worked when the keydown event occurs or it binds a function to run when a keydown event occurs.
  • A keydown event happens by pressing a keyboard key.
  • There are two other events are present in jQuery that is related to keydown event.

1 keypress: This event happens when a keyboard key is pressed down.

2 keyup: This event happens when a keyboard key is released.

Related Topics:

jQuery change
jQuery submit

jQuery keydown()


$(selector).keydown() ;


If you want to trigger a function in it, the syntax will be:


Parameter description:

  • function: It represents the function to run when the keydown event is triggered. It is optional.


<title>jQuery Example</title>
<script type = "text/javascript"
$(this).css("background-color", "pink");


<h2>jQuery Keydown event Example</h2>
Name: <input class="name" type="text" name="fullname">


Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments