-
Notifications
You must be signed in to change notification settings - Fork 5
/
邹旦-20281269.html
75 lines (73 loc) · 2.09 KB
/
邹旦-20281269.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
74
75
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登陆页面</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f1f1f1;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}
h1 {
text-align: center;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
width: 100%;
padding: 10px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
.success {
color: #4CAF50;
text-align: center;
margin-top: 10px;
}
.error {
color: #f44336;
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1>Login</h1>
<input type="text" id="username" placeholder="Username">
<input type="password" id="password" placeholder="Password">
<button onclick="login()">Login</button>
<div id="message"></div>
</div>
<script>
function login() {
var username = document.getElementById("username").value;
var password = document.getElementById("password").value;
if (username === "zoudan" && password === "password") {
document.getElementById("message").innerHTML = "登录成功!";
document.getElementById("message").className = "success";
} else {
document.getElementById("message").innerHTML = "Invalid username or password.";
document.getElementById("message").className = "error";
}
}
</script>
</body>
</html>