当前位置:网站首页>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
边栏推荐
- MYSQL一种分表实现方案及InnoDB、MyISAM、MRG_MYISAM等各种引擎应用场景介绍
- On September 8, the night before going to Songshan Lake
- 金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
- js 抛物线运动方法封装
- 修改Firebase Emulators的默认侦听IP
- elk安装
- Research on recyclerview details - Discussion and repair of recyclerview click dislocation
- DP energy Necklace
- JDBC和servlet写CRUD的接口总结
- Request module
猜你喜欢

postman批量生产body信息(实现批量修改数据)

MySQL数据库讲解(八)

关于云容灾,你需要知道这些

倒计时1天~2022云容灾产品线上发布会即将开始

进入新公司,运维工程师从下面这几项了解系统的部署

Postman的安装使用及填坑心得

微信小程序客服接入,实现发送和接收消息

OpenStack命令操作

Storage path of mod subscribed by starbound Creative Workshop at Star boundary

Operation instructions of star boundary automatic text translator (advanced version)
随机推荐
js 进度条,显示加载进度
星界边境Starbound创意工坊订阅的mod的存放路径
mysql 5.1升级到5.66
使用Executors类快速创建线程池
squid代理
Mysql的安装过程(已经安装成功的步骤说明)
MySQL基础知识
MySQL同步Could not find first log file name in binary log index file错误
線程組ThreadGroup使用介紹+自定義線程工廠類實現ThreadFactory接口
VMware installation 64 bit XP Chinese tutorial
postman批量生产body信息(实现批量修改数据)
倒计时1天~2022云容灾产品线上发布会即将开始
Recyclerview advanced use (I) - simple implementation of sideslip deletion
man man随记和crontab的@reboot用法
01-nio basic ByteBuffer and filechannel
Algorithem_ReverseLinkedList
yml引用其他变量
回顾2021:如何帮助客户扫清上云最后一公里的障碍?
Returns the subscript after array sorting
星界边境文本自动翻译机使用说明