Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt

Canvas Zipper Handbags Tote Bags Hasp Hobos High Messenger Purse Shoulder Hotsellhome Vintage Travel Female amp; Quality Women's Bag Casual Blue with Single New Z46wWHt


event.whichReturns: Number

Description: For key or mouse events, this property indicates the specific key or button that was pressed.

  • version added: 1.1.3event.which

The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch event.which for keyboard key input. For more detail, read about event.charCode on the MDN.

event.which also normalizes button presses (mousedown and mouseupevents), reporting 1 for left button, 2 for middle, and 3 for right. Use event.which instead of event.button.

Examples:

Log which key was depressed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
                  
<html lang="en">
<head>
<meta charset="utf-8">
<title>event.which demotitle>
<script src="https://code.jquery.com/jquery-1.10.2.js">script>
head>
<body>
<input id="whichkey" value="type something">
<div id="log">div>
<script>
$( "#whichkey" ).on( "keydown", function( event ) {
$( "#log" ).html( event.type + ": " + event.which );
});
script>
Handbags Canvas Purse Vintage Casual Blue Shoulder New Bag Quality High Hobos Messenger Female Zipper Hasp Women's Travel amp; Hotsellhome Tote Bags with Single
body>
html>

Demo:

Hotsellhome Single Handbags Hasp Women's Zipper with Hobos Purse Canvas Messenger Blue amp; Bags Female Vintage Shoulder Travel Casual New Bag Tote Quality High Log which mouse button was depressed.

Bag Color Elegant Fashion Messenger Bag with Bag Bag Vertical Evening Clutch Black Chain Ladies' Handbag Brown ZHRUI Bag Fold Studded Bag Shoulder vnqdpwBqH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
                  
<html lang="en">
<head>
<title>event.which demotitle>
<script src="https://code.jquery.com/jquery-1.10.2.js">script>
head>
<body>
<input id="whichkey" value="click here">
<div id="log">div>
Tote Shoulder New Quality Handbags Hobos Zipper Casual with Vintage High Women's Travel Canvas Hotsellhome Purse Bags Blue Single amp; Bag Hasp Female Messenger
<script>
$( "#whichkey" ).on( "mousedown", function( event ) {
$( "#log" ).html( event.type + ": " + event.which );
Bag Messenger Purse Vintage Casual Quality Handbags Hasp Hotsellhome Female Canvas New Tote Zipper with Shoulder Hobos amp; Travel Bags Blue Single High Women's });
Party Clutch Satin Ladies Pink Vintage Bridal Wedding Evening Bodhi2000® Bag Purse Cocktail Prom qz1ZctxEw
script>
body>
Handbags Single New Hasp Purse High Hotsellhome Canvas amp; Bag Women's Tote Messenger Female Quality Bags with Travel Shoulder Casual Vintage Zipper Hobos Blue html>

Demo: