Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Login</title>
- <script type="text/javascript">
- function login(){
- var un = document.form.username.value;
- var pw = document.form.password.value;
- if (un == "billiejean"){
- if (pw == "notmyluvr"){
- alert("Correct!");
- parent.location = "categories.html";
- }
- else {
- alert("Incorrect Username/Password.");
- }
- }
- if (un == "annie"){
- if (pw == "ruokay"){
- alert("Correct!");
- parent.location = "categories.html";
- }
- else {
- alert("Incorrect Username/Password.");
- }
- }
- }
- </script>
- </head>
- <body>
- <form id="form" name="form" method="post" enctype="text/plain" action=>
- <center>
- <table border="1" cellpadding="5">
- <tr>
- <td colspan="2">Login</td>
- </tr>
- <tr>
- <td>Username</td>
- <td><input type="text" name="username" size="20"></td>
- </tr>
- <tr>
- <td>Password</td>
- <td><input type="password" name="password" size="20"></td>
- </tr>
- <tr>
- <td colspan="2" align="center"><input type="button" value="Submit" onclick="login()">
- <input type="reset" value="Reset"></td>
- </tr>
- </table>
- </center>
- </form>
- <center><b><a href="reg.html">
- New users click here to register.</a></b></center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement