PoiNtEr->: Password Protect Your HTML Page

                             Difference between a dream and an aim. A dream requires soundless sleep, whereas an aim requires sleepless efforts.

Search This Blog

Tuesday, January 11, 2011

Password Protect Your HTML Page


Put this code on your page:

<HEAD>

<SCRIPT language="JavaScript">

<!--hide

var password;

var pass1="cool";

password=prompt('Please enter your password to view this page!',' ');

if (password==pass1)

alert('Password Correct! Click OK to enter!');

else

{

window.location="http://vishallovesualot.blogspot.com/";

}

//-->

</SCRIPT>

</HEAD>

NOw in place of "cool" you can put any password of your choice.

/* have any problem? ..just Ask For help here :) */

No comments:

Post a Comment