当前位置:网站首页>JS key value judgment
JS key value judgment
2022-04-23 14:16:00 【Ruirui junior】
$("body").on("keydown",function(event){
debugLog("event.which:"+event.which);
if(event.which === 37){
debugLog("left37")
event.preventDefault();
}else if(event.which == 38){
debugLog("up38")
event.preventDefault();
}else if(event.which == 39){
debugLog("right39")
event.preventDefault();
}else if(event.which == 40){
debugLog("down40")
event.preventDefault();
}else if(event.which == 13){
debugLog("enter13")
event.preventDefault();
}else if(event.which == 27){
debugLog(" return 27")
event.preventDefault();
}
});
版权声明
本文为[Ruirui junior]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231408339229.html
边栏推荐
- How to do a project easily
- How does void * exist?
- OpenStack命令操作
- rsync+inotify远程同步
- 倒计时1天~2022云容灾产品线上发布会即将开始
- VMware installation 64 bit XP Chinese tutorial
- 线程间控制之Semaphore使用介绍
- On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
- 关于NodeJS中JSON5的相关配置和使用
- win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
猜你喜欢
HyperMotion云迁移助力中国联通,青云完成某央企上云项目,加速该集团核心业务系统上云进程
PySide2
星界边境Starbound创意工坊订阅的mod的存放路径
Logback logger and root
多云数据流转?云上容灾?年前最后的价值内容分享
redis数据库讲解二(redis高可用、持久化、性能管理)
进入新公司,运维工程师从下面这几项了解系统的部署
RecyclerView细节研究-RecyclerView点击错位问题的探讨与修复
Recyclerview advanced use (I) - simple implementation of sideslip deletion
关于NodeJS中JSON5的相关配置和使用
随机推荐
How QT designer adds resource files
Homebrew是什么?以及使用
Some good articles on pthread multithreading
HyperMotion云迁移助力中国联通,青云完成某央企上云项目,加速该集团核心业务系统上云进程
使用DialogFragment的一些感受及防踩坑经验(getActivity、getDialog为空,cancelable无效等)
星界边境文本自动翻译机(高级版)使用说明
MySQL数据库讲解(八)
统信UOS卸载php7.2.24,安装php7.4.27 ;卸载再安装为PHP 7.2.34
容灾有疑问?点这里
Visio installation error 1:1935 2: {XXXXXXXX
01-nio basic ByteBuffer and filechannel
Recyclerview advanced use (I) - simple implementation of sideslip deletion
Introduction to the use of countdownlatch and cyclicbarrier for inter thread control
mysql查询库大小
JDBC details
关于云容灾,你需要知道这些
void*是怎样的存在?
Multiple inheritance virtual base exercises
返回数组排序后下标
字节面试编程题:最小的K个数