WEBLEB
होम
संपादक
लॉग इन करें
Pro
हिंदी
English
Français
Español
Português
Deutsch
Italiano
हिंदी
लॉगिन पासवर्ड सरल
569
mambetov1237.b
संपादक में खोलें
अपना कोड प्रकाशित करें
अनुशंसित
28 February 2025
एनीमेशन रजिस्टर/लॉगिन फॉर्म
6 April 2025
बहुत बढ़िया लॉगिन फ़ॉर्म
10 September 2024
पांडा लॉगिन फॉर्म
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) */