Title: Javascript Password Protection Post by: Daniel Franklin on September 29, 2007, 10:37:16 AM <p align="left"> The protection of web pages using a password comes up earlier or later while developing your site. The most secure way is to implement PHP, ASP or other advanced web programming languages. In this tutorial you will find out how to protect pages using Javascript, because you may need to have a very simple protection, or your current hosting may not support PHP.
The first example we are going to discuss is the <font color="blue">prompt() </font>function. The function calls a small box to appear, and unless you enter correct password, you will not be able to view the page. The advantage is that you can't view the source code to find out the password without turning Javascript off. The code is as follows: Code: <BR> |