<!--KEY TRIGGER--> <!-- This goes in the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2002, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- var key = "w"; // change the key on the left to suit your needs. Numbers can also be used. function theKey(e) { if (document.layers) { var thisKey = e.which; } else { thisKey = event.keyCode; } if (String.fromCharCode(thisKey).toLowerCase() == key) { window.alert("Hello and Welcome to\nSandeep\'s Nook");} } document.onkeypress = theKey; //--> </script> <!-- In the example it is the 'w' key that has been set to trigger the function that opens an alert box. -->