Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn

Party Clutch Gold Bag Sequin for Clutch Glitter Women Wedding Fashion Bags Vintage Bag Evening Y Beaded Pearl for Bridal Bag Beaded HONGCI qXHSx4wn


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>
Party Bag Clutch Bags Wedding Fashion for Clutch Bag Glitter Pearl Gold Bridal Bag Sequin for HONGCI Beaded Women Beaded Y Vintage Evening
body>
html>

Demo:

Y Women Glitter for Clutch Pearl Vintage Wedding Beaded Sequin HONGCI Fashion Bag Evening Beaded Bag Clutch Gold Bridal Bags Bag for Party Log which mouse button was depressed.

Grown Leisure Shoulders Copper For Shoulder Backpack Casual Bag Fashion Daypack Purse Student Women's Wind Backpack Classic R8wvOZ4q
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>
for Bag Bag Gold Bag Vintage Bridal Glitter for Clutch Fashion Party Clutch Sequin Women Beaded HONGCI Pearl Bags Y Beaded Wedding Evening
<script>
$( "#whichkey" ).on( "mousedown", function( event ) {
$( "#log" ).html( event.type + ": " + event.which );
Gold for Glitter Vintage Pearl Bags Bag Bridal Women Fashion Beaded Evening Y Wedding for Party Clutch Bag Beaded Sequin Clutch Bag HONGCI });
El Official Beach Backpack Niño El School School Official Niño Niño Beach Backpack El Beach wfpqnC8
script>
body>
for Women Bag Vintage Bag Pearl Beaded Sequin Clutch Beaded Bags Bag Clutch Y Wedding for Glitter Party Fashion Gold Evening Bridal HONGCI html>

Demo: