Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Document</title>
- </head>
- <body>
- <form>
- <input id="user" type="text" name="username"
- placeholder="username">
- <input id="pass" type="password" id="pass" name="password">
- <input id="subm"type="button" name="submit" value="submit"
- onclick="checkPswd();">
- </form>
- </body>
- <script type="text/javascript">
- function checkPswd(){
- var confirmpassword = "admin";
- var username = document.getElementById('user').value;
- var password = document.getElementById("pass").value;
- if(password == confirmpassword){
- window.location.href = "redu.html";
- }else{
- alert('try again');
- }
- };
- </script>
- </html>
Add Comment
Please, Sign In to add comment