daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Apr 27th, 2016 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>MY WEBPAGE</title>
  4. </head>
  5. <body>
  6. <script>
  7.   function submitFunction()
  8.   {
  9.     var x = document.forms["myform"]["username"].value;
  10.     var y = document.forms["myform"]["pwd"].value;
  11.     if(x == null || x == "" || y == null || y == "")
  12.     {
  13.       alert("Both fields can't be empty.");
  14.     }
  15.     else if(x == "Srinivas")
  16.     {
  17.       if(y=="7899008899")
  18.       {
  19.         alert("Login Successfull.");
  20.         return true;
  21.       }
  22.       else {
  23.         alert("Password do not match");
  24.         return false;
  25.       }
  26.     }
  27.     else {
  28.       alert("User don't match");
  29.       return false;
  30.     }  
  31.   </script><form name="myform" action="index.html"                                            onsubmit="submitFunction()",method="post">
  32.   Username: <input type="text" name="username"><br>
  33.   Password:<input type="password" name="pwd"><br>
  34.   <input type=  "submit" value="Submit">    
  35.   </form>      
  36.   </body>
  37.   </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top