Code.
Here is the code that how i locked my page. You look at the code there it's say's "Desired Password Goes here". That you have to put your own password. and then you need to copy the code then paste it at your page.But when you in your page you go to SEO setting all you have to do just pate it on the Header code. That's all .bye.Hope you enjoy.
<SCRIPT language="JavaScript">
<!--hide
var password;
var pass1="Desired Password Goes Here";
password=prompt('Please enter your password to view this page!',' ');
if (password==pass1)
alert('Password Correct! Click OK to enter!');
else
{
window.location="Wrong Page URL";
}
//-->
</SCRIPT>
<!--hide
var password;
var pass1="Desired Password Goes Here";
password=prompt('Please enter your password to view this page!',' ');
if (password==pass1)
alert('Password Correct! Click OK to enter!');
else
{
window.location="Wrong Page URL";
}
//-->
</SCRIPT>