jQuery event.which 属性

jQuery 教程 · 2019-03-11 08:13:29

实例

返回哪个键盘键被按下:

$("input").keydown(function(event){
    $("div").html("Key: " + event.which);
});

定义和用法

event.which 属性返回指定事件上哪个键盘键或鼠标按钮被按下。

语法


event.which

参数 描述
event 必需。event 参数来自事件绑定函数。

点击查看所有 jQuery 教程 文章: https://codercto.com/courses/l/35.html

查看所有标签

Traction: A Startup Guide to Getting Customers

Traction: A Startup Guide to Getting Customers

Gabriel Weinberg、Justin Mares / S-curves Publishing / 2014-8-25 / USD 14.99

Most startups end in failure. Almost every failed startup has a product. What failed startups don't have is traction -- real customer growth. This book introduces startup founders and employees to......一起来看看 《Traction: A Startup Guide to Getting Customers》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

MD5 加密
MD5 加密

MD5 加密工具