Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Its a login form!
- </title>
- <script type="text/javascript">
- function isValid()
- {
- var password=document.getElementById('password').value;
- var username=document.getElementById('username').value;
- if(password=="lol" && username=="adarsh")
- {
- alert("You're in. Ok. Bye!");
- }
- else
- {
- alert("You got the wrong password");
- }
- }
- </script>
- </head>
- <form name="PasswordField" action="">
- username: <input type="text" id="username"><br>
- password: <input type="password" id="password"> <br>
- <input type="button" value="Login" onclick="isValid();">
- </form>
- </html>
Add Comment
Please, Sign In to add comment