jingmi-coding

JS设置组合快捷键

为提升用户体验,想要在web页面中通过组合快捷键调出用户帮助页面,具体实现思路是监听keyup事件,在相应的处理函数中进行逻辑编写,代码如下

1 $(document).keyup(function (event) {
2      if(event.target.type == \'text\'){
3         return;
4   }
5      if(event.shiftKey && event.keyCode == 72){
6       //调出帮助页面
7     } 
8 
9  });

 

posted on 2017-04-06 17:16  静谧coding  阅读(1259)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2021-08-24
  • 2021-05-28
  • 2021-09-09
  • 2022-01-02
  • 2021-12-23
  • 2021-07-18
  • 2021-12-02
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-16
  • 2021-12-04
  • 2022-03-01
  • 2021-12-23
相关资源
相似解决方案