JavaScript Source Code 3000: Password Protection: Multiple Users (In)
Multiple Users (In)
In order to get to the page you are viewing (this page!), you had to enter the correct username and password combination, which in this case was guest/login. The source code is available below if you would like to put this password protection on your site. And, don't forget you can set up multiple user accounts!
JavaScript Source Code 3000: Password Protection: Multiple Users
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!
<!-- TWO STEPS TO INSTALL MULTIPLE USERS:
1. Copy the first code into the HEAD of your HTML document
2. Put the last coding into the BODY of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your login HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<! >
<! >
<!-- Begin
function Login(){
var done=0;
var username=document.login.username.value;
username=username.toLowerCase();
var password=document.login.password.value;
password=password.toLowerCase();
if (username=="member1" && password=="password1") { window.location="page1.html"; done=1; }
if (username=="member2" && password=="password2") { window.location="page2.html"; done=1; }
if (username=="member3" && password=="password3") { window.location="page3.html"; done=1; }
if (done==0) { alert("Invalid login!"); }
}
// End -->
</SCRIPT>
<!-- STEP TWO: Paste this code into the BODY of your HTML document -->
<BODY>
<center>
<form name=login>
<table width=225 border=1 cellpadding=3>
<tr><td colspan=2><center><font size="+2"><b>Members-Only Area!</b></font></center></td></tr>
<tr><td>Username:</td><td><input type=text name=username></td></tr>
<tr><td>Password:</td><td><input type=text name=password></td></tr>
<tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr>
</table>
</form>
</center>
<!-- Script Size: 1.60 KB -->
Wyszukiwarka
Podobne podstrony:
multiple users prompt sourcemultiple usersmultiple users promptsource30MultipleComponentProfileHolderMatrix3?pp sourceThread?pp sourcearm biquad ?scade ?1 ?st q31? sourcearm conv ?2? sourcearm mat mult q15? sourceMultiple ChoiceResource 8inl sourcearm fir lattice init q31? sourcearm fir ?cimate ?st q15? sourceMultiplekserwięcej podobnych podstron