|
|
Java menu script>Menu Make>Word Launcher
|
A modified version of our Key Launcher script that gives you
access to a secret page only if the correct word is typed. Cool!
<!-- ONE STEP TO INSTALL WORD LAUNCHER:
1. Copy the coding into the HEAD of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var SpecialWord = "javascript",
SpecialUrl = "http://javascript.internet.com/new/",
SpecialLetter = 0;
function getKey(keyStroke) {
var isNetscape=(document.layers);
// Cross-browser key capture routine couresty
// of Randy Bennett (rbennett@thezone.net)
var eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
var which = String.fromCharCode(eventChooser).toLowerCase();
if (which == SpecialWord.charAt(SpecialLetter)) {
SpecialLetter++;
if (SpecialLetter == SpecialWord.length) window.location = SpecialUrl;
}
else SpecialLetter = 0;
}
document.onkeypress = getKey;
// End -->
</script>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts
provided<br>
by <a href="http://javascriptsource.com">The JavaScript
Source</a></font>
</center><p>
<!-- Script Size: 1.05 KB --> |
|
|
|
|
|