Home > Web Front-end > JS Tutorial > body text

jquery HotKeys轻松搞定键盘事件代码_jquery

WBOY
Release: 2016-05-16 19:01:39
Original
1405 people have browsed it

使用方法:

复制代码 代码如下:

$.hotkeys.add('键名', function(){ 要实现的目的});
//键名可以是单键,也可以是组合键例如:ctrl+c就表示同时按下ctrl和c.

取消某个键的事件:
复制代码 代码如下:

$.hotkeys.remove('键名');

具体演示效果请转到我专门翻译的一个页面,你可以自己测试特殊键和组合键:http://img.jb51.net/online/jquery_HotKeys.html

下载插件地址::http://code.google.com/p/js-hotkeys/downloads/list

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!