• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 21. JavaScript Project: Setting ... > A First Attempt at Password Protecti...

A First Attempt at Password Protection

For our first attempt at constructing a password-protected page, let's begin by assuming that the page being protected is named secret.htm, and that the password required is password. The next couple of sections try out some ineffective but instructive methods.

Prompting for a Password

Listing 21.1 presents a script that attempts to restrict access to the secret.htm page.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint