-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path20281005-李嘉芮.html
73 lines (73 loc) · 1.96 KB
/
20281005-李嘉芮.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style type="text/css">
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f1f1f1;
}
.login-form {
background: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
width: 300px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
font-weight: bold;
margin-bottom: 5px;
}
.form-group input {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 3px;
}
.form-group button {
background: #4caf50;
color: #fff;
border: none;
padding: 10px;
width: 100%;
cursor: pointer;
}
</style>
</head>
<body>
<div class="login-form">
<h2>欢迎登录</h2>
<div class="form-group">
<label for="username">用户账号:</label>
<input type="text" id="username" placeholder="请输入您的账户:">
</div>
<div class="form-group">
<label for="password">密码:</label>
<input type="password" id="password" placeholder="请输入您的密码:">
</div>
<div class="form-group">
<button onclick="checkLogin()">登录</button>
</div>
</div>
<script>
function checkLogin() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
// 进行登录验证的逻辑处理
if (username === "ljr" && password === "123456") {
alert("登录成功!");
} else {
alert("请重新输入账号密码!");
}
}
</script>
</body>
</html>