How to make Password Protect a Web Page




Protecting a web page not easy thing. We found a perfect 100% working javaScript code to hide your page.you can use this method to your web page or your blog (Wordpress And blogger )this is not an advance code to hide .this is just a code that asking a password and show your hide web page .! We call this method  password protect a web site method or website password method . Let's see  how to do that 





<SCRIPT>

function passWord() {

var testV = 1;

var pass1 = prompt('Please Type Your Password',' ');

while (testV < 3) {

if (!pass1)

history.go(-1);

if (pass1.toLowerCase() == "Your password") {

alert('You Got it Right!');

window.open('your hide page link');

break;

}

testV+=1;

var pass1 =

prompt('Your Password is Incorrect, Please Try Again.','Password');

}

if (pass1.toLowerCase()!="password" & testV ==3)

history.go(-1);

return " ";

}

</SCRIPT>

<CENTER>

<FORM>

<input type="button" value="See hide Page" onClick="passWord()">

</FORM>

</CENTER>



This Colour Represent Message Box Tex 

This Colour Represent  Your Password 

This Colour Represent your hide page link

This Colour Represent button Text


Above colours fonts, you can change in the code


Labels:

Post a Comment

[blogger]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget