Cut & Paste Password Protector 2
Credit: Unknown

Description: The below will password protect any page, the password being the name of the file. For example, say I want to protect page2.html. The password would be "page2". So all you have to do now is rename the page you want to protect to a longer and more complicated file name, and that will be the password that will access that page.  The script can only protect pages that end in ".html", and NOT ".htm", so be sure to rename the extensions. And no, you don't have to add anything to the protected page. In the below case, the password is page2

Example:

Enter password

Directions: Step 1: Insert this in the <head> section:

Step 2: Insert this in the <body> section:

http://www.javascriptkit.com
CopyRight © 1997, 1998 JavaScript Kit.