Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="master.css">
- <title>Day Four</title>
- </head>
- <body>
- <h1>Log In</h1>
- <form onsubmit="valid()">
- <label for="username">Username:</label>
- <input id = 'user-name' type="text" name="" value="" required>
- <label for="password">Password:</label>
- <input id = 'pass-word' type="password" name="" value="" required>
- <input id = 'log-in'type="submit" name="" value="Log In">
- </form>
- </div>
- </body>
- <script src="mainJs.js" charset="utf-8"></script>
- </html>
- function valid(){
- var username = document.querySelector('#user-name').value;
- var password = document.querySelector('#pass-word').value;
- if(username === 'test' && password === '1'){
- window.open("gradebook.html")
- }else{
- alert("Wrong username or password")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement