Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.94 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>Login Page</title>
  5.     <link rel="stylesheet" href="loginpage.css" />
  6.  
  7.  
  8.     <script>
  9.         function checkform()
  10.         {
  11.             user_check = document.getElementById("username").value;
  12.             pass_check = document.getElementById("password").value;
  13.             id_check = document.getElementById("id").value;
  14.             if (user_check != "" || pass_check != "" || id_check != "")
  15.             {
  16.                 if (user_check == "SSS" && pass_check == "123456" && id_check == "1234") {
  17.                    alert("Authenticated.");
  18.                 }
  19.                 else {
  20.                     alert("Failed to Authenticate.");
  21.                 }
  22.             }
  23.             else {
  24.                 alert("Empty Field!");
  25.                
  26.             }
  27.              
  28.            
  29.         }
  30.     </script>
  31.  
  32. </head>
  33.    
  34.    
  35. <body>
  36.  
  37.     <h1 id="welcome">Please Login with your credentials.</h1>
  38.  
  39.     <form onsubmit="checkform()">
  40.         <table  id="Table1">
  41.             <tr>
  42.                 <td>
  43.                     Username:
  44.                 </td>
  45.                 <td>
  46.                     <input type="text" id="username" />
  47.                 </td>
  48.             </tr>
  49.  
  50.             <tr>
  51.                 <td>
  52.                     Password:
  53.                 </td>
  54.                 <td>
  55.                     <input type="password" id="password"/>
  56.                 </td>
  57.             </tr>
  58.  
  59.  
  60.             <tr>
  61.                 <td>
  62.                     ID:
  63.                 </td>
  64.                 <td>
  65.                     <input type="text" id="id" />
  66.                 </td>
  67.             </tr>
  68.  
  69.             <tr>
  70.                 <td>
  71.                     <input type="reset" value="Reset" />
  72.                 </td>
  73.                 <td>
  74.                     <input type="submit" value="Submit" />
  75.                 </td>
  76.             </tr>
  77.  
  78.         </table>
  79.     </form>
  80.  
  81. </body>
  82. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement