当前位置:网站首页>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
边栏推荐
猜你喜欢
squid代理
win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
字节面试编程题:最小的K个数
MySQL数据库讲解(七)
postman批量生产body信息(实现批量修改数据)
PySide2
ThreadGroup ThreadGroup implémente l'interface threadfactory en utilisant la classe Introduction + Custom thread Factory
RecyclerView进阶使用-实现仿支付宝菜单编辑页面拖拽功能
sql中出现一个变态问题
随机推荐
uni-app消息推送
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
Request module
krpano全景之vtour文件夹和tour
pthread_ Why does self() repeat
关于云容灾,你需要知道这些
教育行业云迁移最佳实践:海云捷迅使用HyperMotion云迁移产品为北京某大学实施渐进式迁移,成功率100%
gif转为静态图片处理
MySQL基础知识
MySQL数据库讲解(十)
拨开云雾synchronized使用五种方式介绍
json date时间日期格式化
星界边境Starbound创意工坊订阅的mod的存放路径
bc的用法
差分隐私(背景介绍)
dp-能量项链
redis数据库讲解(三)redis数据类型
Preview CSV file
01-nio basic ByteBuffer and filechannel
01-NIO基础之ByteBuffer和FileChannel