Password Inside Page

[Total: 0    Average: 0/5]

This is a simple password script.

Head Code:

<script language="javascript"> 
<!-- begin 
var _URL="/"; /* make this any url you are protecting with this password script */
function check(p) { 
if ( p.pass.value != "password" ) 
{ p.sub.value = "INCORRECT PASSWORD" 
alert("INCORRECT PASSWORD") 
} else { 
p.sub.value = "PASSWORD ACCEPTED" 
alert("PASSWORD ACCEPTED!!") 
document.location=_URL;
} } 
// stop hiding --> 
</script> 

Body Code:

<h1>Enter the password.</h1> 
(Note: The password is "<b><i>password</i></b>")
<hr color=yellow> 
<form method=post> 
Password: 
<input type=password name="pass"><br> 
<input type=button value="SUBMIT" name="sub" onClick="check(this.form)"> 
</form> 

Times Viewed: 11

Leave a Reply

Your email address will not be published. Required fields are marked *