[转] jQuery按键响应事件keypress对应的按键编码keycode
原文地址:http://blog.csdn.net/chenhj1988918/article/details/7534922
keypress api 文档:http://api.jquery.com/keypress/
event.keycode值大全 keycode = BackSpace BackSpace keycode = Tab Tab keycode = Clear keycode = Enter keycode = Shift_L keycode = Control_L keycode = Alt_L keycode = Pause keycode = Caps_Lock keycode = Escape Escape keycode = space space keycode = Prior keycode = Next keycode = End keycode = Home keycode = Left keycode = Up keycode = Right keycode = Down keycode = Select keycode = Print keycode = Execute keycode = Insert keycode = Delete keycode = Help keycode = equal braceright keycode = exclam onesuperior keycode = quotedbl twosuperior keycode = section threesuperior keycode = dollar keycode = percent keycode = ampersand keycode = slash braceleft keycode = parenleft bracketleft keycode = parenright bracketright keycode = a A keycode = b B keycode = c C keycode = d D keycode = e E EuroSign keycode = f F keycode = g G keycode = h H keycode = i I keycode = j J keycode = k K keycode = l L keycode = m M mu keycode = n N keycode = o O keycode = p P keycode = q Q at keycode = r R keycode = s S keycode = t T keycode = u U keycode = v V keycode = w W keycode = x X keycode = y Y keycode = z Z keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_ KP_ keycode = KP_Multiply KP_Multiply keycode = KP_Add KP_Add keycode = KP_Separator KP_Separator keycode = KP_Subtract KP_Subtract keycode = KP_Decimal KP_Decimal keycode = KP_Divide KP_Divide keycode = F1 keycode = F2 keycode = F3 keycode = F4 keycode = F5 keycode = F6 keycode = F7 keycode = F8 keycode = F9 keycode = F10 keycode = F11 keycode = F12 keycode = F13 keycode = F14 keycode = F15 keycode = F16 keycode = F17 keycode = F18 keycode = F19 keycode = F20 keycode = F21 keycode = F22 keycode = F23 keycode = F24 keycode = Num_Lock keycode = Scroll_Lock keycode = acute grave keycode = comma semicolon keycode = minus underscore keycode = period colon keycode = numbersign apostrophe keycode = plusminus hyphen macron keycode = keycode = copyright registered keycode = guillemotleft guillemotright keycode = masculine ordfeminine keycode = ae AE keycode = cent yen keycode = questiondown exclamdown keycode = onequarter onehalf threequarters keycode = less greater bar keycode = plus asterisk asciitilde keycode = multiply division keycode = acircumflex Acircumflex keycode = ecircumflex Ecircumflex keycode = icircumflex Icircumflex keycode = ocircumflex Ocircumflex keycode = ucircumflex Ucircumflex keycode = ntilde Ntilde keycode = yacute Yacute keycode = oslash Ooblique keycode = aring Aring keycode = ccedilla Ccedilla keycode = thorn THORN keycode = eth ETH keycode = diaeresis cedilla currency keycode = agrave Agrave atilde Atilde keycode = egrave Egrave keycode = igrave Igrave keycode = ograve Ograve otilde Otilde keycode = ugrave Ugrave keycode = adiaeresis Adiaeresis keycode = ediaeresis Ediaeresis keycode = idiaeresis Idiaeresis keycode = odiaeresis Odiaeresis keycode = udiaeresis Udiaeresis keycode = ssharp question backslash keycode = asciicircum degree keycode = sterling keycode = Mode_switch 使用event对象的keyCode属性判断输入的键值 eg:if(event.keyCode==)alert(“enter!”); 键值对应表 A 0X65 U 0X85 B 0X66 V 0X86 C 0X67 W 0X87 D 0X68 X 0X88 E 0X69 Y 0X89 F 0X70 Z 0X90 G 0X71 0X48 H 0X72 0X49 I 0X73 0X50 J 0X74 0X51 K 0X75 0X52 L 0X76 0X53 M 0X77 0X54 N 0X78 0X55 O 0X79 0X56 P 0X80 0X57 Q 0X81 ESC 0X1B R 0X82 CTRL 0X11 S 0X83 SHIFT 0X10 T 0X84 ENTER 0XD 如果要使用组合键,则可以利用event.ctrlKey,event.shiftKey,event .altKey判断是否按下了ctrl键、shift键以及alt键
[转] jQuery按键响应事件keypress对应的按键编码keycode的更多相关文章
- js获取键盘按键响应事件(兼容各浏览器)
<script type="text/javascript" language="JavaScript" charset="UTF-8" ...
- linux下获取按键响应事件【转】
本文转载自:https://my.oschina.net/u/157503/blog/91548 1.问题 通过一个死循环将读取键盘对应的设备文件将触发键盘事件在屏幕上打印出来,按esc退出程序 代码 ...
- jQuery滑动并响应事件
jQuery滑动并打开指定页面: <!DOCTYPE html> <html> <head> <script src="http://code.jq ...
- jQuery事件--keypress([[data],fn])和trigger(type,[data])
keypress([[data],fn]) 概述 当键盘或按钮被按下时,发生 keypress 事件 keypress 事件与 keydown 事件类似.当按钮被按下时,会发生该事件.它发生在当前获得 ...
- jQuery中的事件与动画 (你的明天Via Via)
众所周知,页面在加载时,会触发load事件:当用户单击某个按钮时,会触发该按钮的click事件. 这些事件就像日常生活中,人们按下开关,灯就亮了(或者灭了),往游戏机里投入游戏币就可以启动游戏一样, ...
- Jquery中的事件和动画
在学习Jquery中的过程中我们绝大部分都用到了事件的操作,也可以说事件是Jquery中必不可少的一部分,我们常见的一些事件有单击事件,鼠标事件,键盘事件等等.在Jquery中的学习中为了能使让页面以 ...
- jQuery 参考手册 - 事件
事件方法会触发匹配元素的事件,或将函数绑定到所有匹配元素的某个事件. bind()向匹配元素附加一个或更多事件处理器 $(selector).bind(event,function) $(select ...
- Jquery基础之事件操作
事件是用户操作时页面或页面加载时引发的用来完成javascript和HTML之间的交互操作.常见的元素点击事件.鼠标事件.键盘输入事件等,较传Javascript 相比JQuery增加并扩展了基本的事 ...
- 【总结整理】JQuery基础学习---事件篇
jQuery鼠标事件之click与dbclick事件 用交互操作中,最简单直接的操作就是点击操作.jQuery提供了两个方法一个是click方法用于监听用户单击操作,另一个方法是dbclick方法用于 ...
随机推荐
- Oracle的dmp文件的导入
项目开始拿到了dmp文件,数据库用的是10g的,但是尽然没导成功,后来想可能导出的时候用11导出的,决定试一下. 正好自己的机器是11的客户端,结果不识别imp命令,到安装目录下的bin文件夹下看尽然 ...
- plsql的参数IN和OUT
代码片段一 create or replace procedure scott.pro_para_inout(p_dname in out scott.dept.dname%TYPE, p_loc o ...
- 只需三步:使用C# 操作 Azure 队列
Step 1 : 安装windows Azure package Step 2 : 配置文件增加: <appSettings> <add key="StorageConne ...
- Msys下gcc的配置
打开文件/etc/profile,添加如下路径, C_INCLUDE_PATH=/e/msys/1.0/include export C_INCLUDE_PATH CPLUS_INCLUDE_PATH ...
- HW2.3
import java.util.Scanner; public class Solution { public static void main(String[] args) { final dou ...
- POJ-3017 Cut the Sequence DP+单调队列+堆
题目链接:http://poj.org/problem?id=3017 这题的DP方程是容易想到的,f[i]=Min{ f[j]+Max(num[j+1],num[j+2],......,num[i] ...
- Jetty 8长连接上的又一个坑
Jetty 8 长连接的超时断开连接的机制:超时连接机制针对IO传输过程中的数据阻塞时间超过一定阈值时,断开该连接.阻塞指当前处于数据传输阶段,但是连续指定时间内都没有发出或者接收到任何数据时,Jet ...
- url 编码方法
这个方法用于把 字符串转换成url 的编码 第一个参数是 字符串,第二个参数是 指定的编码(UTF-8 ,GBK, gbk2312...) private string UrlEncode(strin ...
- [一]java环境变量的配置
1.JAVA_HOME(新建):D:\jdk1.6 2.classpath(新建): .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar; 3.path(新增):% ...
- C#使用参数数组
重载,是指在相同的作用域内,声明多个同名的方法.用以对不同类型或数量的参数的参数执行相同的操作.比如,可以求两个或者三个 int类型数中的最大值,我们可以编写这样的方法实现: class Util { ...