//页面初始化函数
$(function() {
    //设置快捷键
    $('body').keyup(function() {
        // 先判断焦点是不是在文本框中或者下拉框
        if (document.activeElement.localName != "input" && document.activeElement.localName != "select" ) {
            var value = event.keyCode;
            //判断按键是不是R
            if (value == 82) {
                
                console.log("按下R键...");
            }
        }
    });
});

 

js页面前盘 快捷键js页面前盘 快捷键js页面前盘 快捷键

相关文章:

  • 2021-11-17
  • 2021-12-19
  • 2021-11-23
  • 2021-12-19
  • 2021-12-17
  • 2021-04-16
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-07-11
  • 2021-07-03
  • 2021-12-22
相关资源
相似解决方案