JS HotKey

To add this script to your site use the directions below

Create a file called hotkey.js and add the code below:

/* JavaScripts.com http://javascripts.com
Created by: Roy Marchand | http://www.expertsrt.com */

var key1="32";
var x='';
function handler(e) {
  if (document.all) {
  var evnt = window.event; 
  x=evnt.keyCode;
  } else
    x=e.charCode;
       if (x==key1) alert("The best JavaScripts on the web are at JavaScripts.com");
       // You could do something like redirect the user to another page:
      // if (x==key1) location.href='http://www.expertsrt.com';
    }
    if (!document.all) {
    window.captureEvents(Event.KEYPRESS);
    window.onkeypress=handler;
  } else {
  document.onkeypress = handler;
}

Add this code to the <head> tag:

  <script type="text/javascript" src="hotkey.js"></script>

That's it!