/
error_404
/
project_2
Обзор
Документация
Войти
/
error_404
/
project_2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
avto.html
34 строки
1 KB
error_404
upload files
03 сен 2025, 15:15
03 сен 2025, 15:15
b603841
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <title>Авторизация</title> <link rel="stylesheet" href="style.css"> </head> <body class = "body2"> <form class = "RRform" id="loginForm"> <h2>Авторизация</h2> <label class = "RRlabel" for="email">Эл. почта</label> <input type="email" name="email" class = "RRinput" id="email"> <label class = "RRlabel" for="password">Пароль</label> <input type="text" name="password" class = "RRinput" id="password"> <button type="submit" class = "RRbutton">Войти</button> </form> <script> document.getElementById('loginForm').addEventListener('submit', function(event) { event.preventDefault(); var email = document.getElementById('email').value; var password = document.getElementById('password').value; if (email === "admin@tickets.ru" && password === "P@ssw0rd") { window.location.href = "index.html"; // Перенаправление на страницу index.html } else { alert("Неверный логин или пароль"); } }); </script> </body> </html>