<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Login Page</title> <style> body { background-color: #BB28FF; } </style> <script type="text/javascript"> function validateForm() { var log = document.forms["logForm"]["login"].value; if (log == "") { alert("Name must be filled out"); return false; } var pas = document.forms["logForm"]["password"].value; if (pas == "") { alert("Password must be filled out"); return false; } } </script></head><body> <img src="https://icons.iconseeker.com/png/fullsize/free-business/sign-in.png"> <h1>Sign In</h1> <form method="post" name="logForm" onsubmit="return validateForm()"> <input type="text" name="login" placeholder="Write your username"><br> <input type="password" name="password" placeholder="Write password"><br> <input type="submit" value="login"> </form> <h3>Instruction</h3> <p>First: Enter your login and password in a correct field.</p> <p>Second: Press "login" button.</p></body></html>
Comments