Key number of pressed key using JQUERY

We can get the number of the key pressed by user by using event.which

This code we will use along with keydown event to collect the pressed key number.

Here is the syntax

$(document).ready(function() {

$("#t1").html('You  Pressed key No: ' + event.which);


  • Video Tutorial on keyboard Events

Event Reference DEMO of event.which Event


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here .

    Most Popular JQuery Scripts


    Two dependant list boxes


    Calendar with Date Selection


    Data change by Slider


    Show & Hide element

    JQuery Video Tutorials

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer