Add a Hotkey | JavaScriptSource

Add a Hotkey

Roy Marchand Dec 19, 2007

General

This script will fire an event when the key specified in the variable "key1" is pressed. In this example, pressing the spacebar will trigger the display of an alert box.


Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: addHotkey.js


Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(0 comments)