Code: <html> <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> </head> <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=password name=password></td></tr> <tr><td colspan=2 align=center><input type=button value="Login!" onClick="Login()"></td></tr> </table> </form> </center> </body> </html>
Any use of it because when you see the source of the page you know which username and password would get me in and also which page it redirects to,
It is like that only. You create a page with that login and I would tell you the usernames and passwords.
hello friend,try this code,it worked on my browser: <head> <script language="JavaScript"> var pass_entered; var password="cool"; while (pass_entered!=password) { pass_entered=prompt('Please enter the password:',''); } self.close(); </script> </head>