Code Library
Home Submit Free Hosting Link To Us Contacts

JavaScript Keyboard hotkey

JavaScript Keyboard hotkey JavaScript JavaScript Keyboard hotkey Download (.zip)



<script language="JavaScript1.2">
var hotkey=104
var destination="http://www.example.com/"
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){ if (document.layers){ if (e.which==hotkey) window.location=destination }
else if (document.all) { if (event.keyCode==hotkey) window.location=destination } }
document.onkeypress=backhome
</script>




  • JavaScriptKeyboard hotkey


Tatet