WEBLEB
Inicio
Editora de código
Iniciar sesión
Pro
Español
English
Français
Español
Português
Deutsch
Italiano
हिंदी
contraseña de inicio de sesión simple
950
mambetov1237.b
Abrir en el editor
Publica tu código
Recomendado
12 September 2025
Efecto de animación de brillo circular CSS
28 December 2024
Un código de staticdata256
3 October 2025
Ejemplo de animación de reflexión CSS
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) */