im making a sight and i need the code but i cant find it
Here is the code:
To install this code, paste all of it starting from the <!–
Then open a notepad window and paste all the code in. Save the document as an HTML page by giving it the file extension .htm when you name it. For example, you may name it something like "password.htm". Just make sure you have the .htm at the end.
You may notice that this is not HTML, but is in fact, Java. HTML cannot do functions like password protection and other active browser functions. The default settings for the destination pages are set to the Yahoo home page. The notes in the script show where to change this to any website you want.
The password is: password (change to whatever you want in the script)
Have fun with the script.
<!– ONE STEP TO INSTALL PASSWORD PROTECT:
1. Copy the coding into the HEAD of your HTML document –>
<!– STEP ONE: Paste this code into the HEAD of your HTML document –>
<HEAD>
<script type="text/javascript">
<!– Begin
var password;
var pass1 = "password"; // place password here
password=prompt("Please enter your password:","");
if (password==pass1) {
window.location= "http://yahoo.com"; // file to open if password is correct
} else {
window.location= "http://yahoo.com"; // file to load if password is incorrect
}
// End –>
</script>
<!– Script Size: 0.81 KB –>
powered by Yahoo Answers
