⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 给页面定义热键 .txt

📁 搜集的很多javascript实例及教程
💻 TXT
字号:
给页面定义热键 

按一下b键试试,看是不是返回到刚才的javascript栏目。

把下面代码copy入你html文件的<head>和</head>中即可:
<script>
<!--
var travel=true
var hotkey=98   /* hotkey即为热键的键值,是ASII码,这里98代表b键 */
var destination="../js.htm" /* 在此定义热键对应的页面 */
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function gogo(e)
{ if (document.layers) { 
if (e.which==hotkey&&travel) window.location=destination }
else if (document.all){ 
if (event.keyCode==hotkey) window.location=destination }
}
document.onkeypress=gogo 
-->
</script> 


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -