WEBLEB
Startseite
Editor
Anmelden
Pro
Deutsch
English
Français
Español
Português
Deutsch
Italiano
हिंदी
Login Passwort einfach
1249
mambetov1237.b
Im Editor öffnen
Veröffentlichen Sie Ihren Code
Empfohlen
17 September 2024
Einfache Anmeldung
14 September 2024
Einfache Taschenrechner
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) */