WEBLEB
Home
Editor
Login
Pro
English
English
Français
Español
Português
Deutsch
Italiano
हिंदी
login password simple
1068
mambetov1237.b
Open In Editor
Publish Your Code
Recommended
14 October 2023
Login Form
23 May 2025
3d login
30 June 2025
HTML Signup Form with Email and Password
HTML
Copy
Форма Логина
Войти в аккаунт
Логин:
Пароль:
Войти
CSS
Copy
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: Arial, sans-serif; height: 100vh; display: flex; justify-content: center; align-items: center; background-color: #f0f0f0; } .login-container { background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 300px; text-align: center; } h2 { margin-bottom: 20px; color: #333; } .input-group { margin-bottom: 15px; text-align: left; } input { width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 4px; } button { width: 100%; padding: 10px; background-color: #4caf50; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } button:hover { background-color: #45a049; } .error-message { color: red; font-size: 14px; margin-top: 10px; } <!-- Replace with your HTML Code (Leave empty if not needed) -->
JS
Copy
document .getElementById("loginForm") .addEventListener("submit", function (event) { event.preventDefault(); const username = document.getElementById("username").value; const password = document.getElementById("password").value; const validUsername = "admin"; const validPassword = "12345"; const errorMessage = document.getElementById("error-message"); if (username === validUsername && password === validPassword) { errorMessage.textContent = ""; alert("Добро пожаловать, " + username + "!"); } else { errorMessage.textContent = "Неверный логин или пароль"; } });/* Replace with your JS Code (Leave empty if not needed) */