当前位置: 代码迷 >> 综合 >> 用js 设置网页快捷键
  详细解决方案

用js 设置网页快捷键

热度:95   发布时间:2024-02-06 21:38:41.0
document.onkeydown = onKeyDownlet that = this// 快捷键function onKeyDown () {if ('router-path' === optionName) {if (window.event.ctrlKey && window.event.shiftKey && (window.event.keyCode == 71)) {that.fn()}}if (['router-path'].includes(optionName)) {if (window.event.altKey && window.event.ctrlKey && (window.event.keyCode == 69)) {that.fn()}}}

 

  相关解决方案