当前位置:网站首页>js 键值判断
js 键值判断
2022-04-23 14:09:00 【瑞瑞小同学】
$("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("返回27")
event.preventDefault();
}
});
版权声明
本文为[瑞瑞小同学]所创,转载请带上原文链接,感谢
https://blog.csdn.net/yr123456654321/article/details/113118455
边栏推荐
- Win10 comes with groove music, which can't play cue and ape files. It's a curvilinear way to save the country. It creates its own aimpack plug-in package, and aimp installs DSP plug-in
- 差分隐私(背景介绍)
- 百度笔试2022.4.12+编程题目:简单整数问题
- Multiple inheritance virtual base exercises
- postman批量生产body信息(实现批量修改数据)
- 时间复杂度计算举例
- mysql 5.1升级到5.69
- mysql 5.1升级到5.68
- 快速搞懂线程实现的三种方式
- Homebrew是什么?以及使用
猜你喜欢
Use the executors class to quickly create a thread pool
HyperMotion云迁移助力中国联通,青云完成某央企上云项目,加速该集团核心业务系统上云进程
A table splitting implementation scheme of MySQL and InnoDB, MyISAM and MRG_ Introduction to MyISAM and other engine application scenarios
squid代理
在Clion中给主函数传入外部参数
倒计时1天~2022云容灾产品线上发布会即将开始
多云数据流转?云上容灾?年前最后的价值内容分享
ThreadGroup ThreadGroup implémente l'interface threadfactory en utilisant la classe Introduction + Custom thread Factory
政务云迁移实践 北明数科使用HyperMotion云迁移产品为某政府单位实施上云迁移项目,15天内完成近百套主机迁移
logback-logger和root
随机推荐
帆软分割求解:一段字符串,只取其中某个字符(所需要的字段)
JDBC详解
void*是怎样的存在?
VMware installation 64 bit XP Chinese tutorial
使用Executors类快速创建线程池
How QT designer adds resource files
A table splitting implementation scheme of MySQL and InnoDB, MyISAM and MRG_ Introduction to MyISAM and other engine application scenarios
Research on recyclerview details - Discussion and repair of recyclerview click dislocation
MySQL数据库讲解(十)
倒计时1天~2022云容灾产品线上发布会即将开始
man man随记和crontab的@reboot用法
正则表达式
Returns the subscript after array sorting
Storage path of mod subscribed by starbound Creative Workshop at Star boundary
RecyclerView高级使用(一)-侧滑删除的简单实现
VMware15Pro在Deepin系统里面挂载真机电脑硬盘
关于NodeJS中JSON5的相关配置和使用
Pass in external parameters to the main function in clion
查询2013年到2021年的数据,只查询到2020的数据,遇到了这个问题所进行的解决办法
OpenStack如何跨版本升级