which

English [wɪtʃ] US [hwɪtʃ,wɪtʃ]

which one; which ones that, fait référence aux choses mentionnées plus tôt

adj which one;

jquery quel événement syntaxe

Fonction : quel attribut indique quelle touche ou quel bouton a été enfoncé.

Syntaxe : event.whic

Paramètres :

ParamètresDescription
event Obligatoire. Spécifie les événements à vérifier. Le paramètre event provient de la fonction de liaison d'événement.​

jquery quel événement exemple

<html>
<head>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("input").keydown(function(event){ 
    $("div").html("Key: " + event.which);
  });
});
</script>
</head>
<body>

请随意键入一些字符:<input type="text" />
<p>当您在上面的框中键入文本时,下面的 div 会显示键位序号。</p>
<div />

</body>
</html>
Exécuter l'instance »

Cliquez sur le bouton « Exécuter l'instance » pour afficher l'instance en ligne