Metachecker.net
|
FontsMadeEasy.com
|
RankChecker.net
Learn Java Script Today
|
Over 5000 Free Fonts
|
Tutorials
|
Javascript Forum
|
Other Javascript Resources
|
Cheat Sheet
JavaScript Basics
Inserting Javascript
Complete Tutorial
Advance DHTML Tutorial
Script archive
Advanced Tutorials
Alert Scripts
Animation
Audio
Background Effects
Banner Ads
Browser Window
Buttons
Button Forms
Calculcators
Calendars
Clocks & Dates
Cookies
Cursor Effects
DHMTL Games
DHTML Miscellaneous
Equivalents
Forms
Games
IE4+ Scripts
IE5+ Scripts
Image Effects
Image Miscellaneous
Links & Buttons
Math Related
Messages Miscellaneous
Miscellaneous
Mouse Tricks
Navigation
Page Details
Password Protection
Pulldown Menus
Random Stuff
Scrolling
Status Bar
Text Animation
User Detail
User Info
Window Control
Keypad
This script displays a keypad on which you can enter a password, and if it is correct it will take you to the page.
The Code Is
1234
Insert into <HEAD>
<SCRIPT language="JavaScript"> <!-- Key-code script by Bart Jellema // You may use this script freely as long // as you credit me for it... var usermulcode=24 // This is to validate the code. In this case // the code is 1234 so the mul = 1*2*3*4 = 24 // Change this value for your own code // If your code is 2415 it will be // usermulcode = 40 (2*4*1*5) var code=0 // the entered code var mul=1 // the multiplied digits var digit=0 // number of digits entered so far var fails=0 // number of tries done function Enter_code(number) { code=code*10+number // Add the digit to the code mul=mul*number // Update mul-value document.codepad.thecode.value=code // Show code digit++ // Increase digit if (digit==4) // Four digits entered { if (mul==24) // This is to validate // the code. In this case // the code is 1234 so the // mul = 1*2*3*4 = 24 // Change this value for // your own code { location=code+".html" } else { fails++ // Increase fails code=0 // Reset values mul=1 digit=0 if (fails<3) { if (fails==1) {document.codepad.thecode.value="Try again"} if (fails==2) {document.codepad.thecode.value="Last time"} } else // To many tries = worp back { location="index.html" document.codepad.thecode.value="Bye!" } } } } function keycodepad(mulcode) { usermulcode=mulcode document.write("<form name=\"codepad\">"); document.write("<input type=\"button\" value=\" 1 \" onClick=\"Enter_code(1)\">"); document.write("<input type=\"button\" value=\" 2 \" onClick=\"Enter_code(2)\">"); document.write("<input type=\"button\" value=\" 3 \" onClick=\"Enter_code(3)\"><br>"); document.write("<input type=\"button\" value=\" 4 \" onClick=\"Enter_code(4)\">"); document.write("<input type=\"button\" value=\" 5 \" onClick=\"Enter_code(5)\">"); document.write("<input type=\"button\" value=\" 6 \" onClick=\"Enter_code(6)\"><br>"); document.write("<input type=\"button\" value=\" 7 \" onClick=\"Enter_code(7)\">"); document.write("<input type=\"button\" value=\" 8 \" onClick=\"Enter_code(8)\">"); document.write("<input type=\"button\" value=\" 9 \" onClick=\"Enter_code(9)\"><br>"); document.write("<input type=\"text\" name=\"thecode\" size=10 value=\"\"><br>"); document.write("</form>"); } // Key-code script by Bart Jellema --> </SCRIPT>
Insert into <BODY>
<script> keycodepad(24) </script>