-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path张守正-20281166.html
109 lines (95 loc) · 2.78 KB
/
张守正-20281166.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>美团外卖商家中心</title>
<link rel="icon" type="image/png" href="https://p0.meituan.net/travelcube/4efa22ffc4a6a49bbaea14e3c0bee86a1337.png">
<style>
body {
background-color: #ffffff;
font-family: Arial, sans-serif;
margin: 0;
}
header {
background-color: #fff;
padding: 13px;
box-shadow: 0 0 5px #ebebeb;
}
.logo {
display: inline-block;
margin-right: 20px;
width: 150px;
height: 50px;
background-image: url(https://w.meituan.net/v1/mss_0e4451a82e1d428f9fc3b99c0b3ebf15/waimai-e-fe-new-574503a2/production/images/logo-5496ba2ea8.webp);
background-size: contain;
background-repeat: no-repeat;
}
h1 {
text-align: center;
margin-top: 50px;
}
form {
margin: 0 auto;
width: 300px;
background-color: #fff;
padding: 50px 60px;
border: none;
padding: 0;
border-radius: 5px;
box-shadow: 0 0 10px #ccc;
}
form label {
display: inline-block;
width: 48px;
}
input[type="text"], input[type="password"] {
width: 60%;
padding: 25px 10px;
margin-bottom: 20px;
outline:medium;
border: none;
box-shadow: 0 0 5px #ccc;
display: inline-block;
}
input[type="submit"] {
background: rgb(255, 209, 0);
color: rgb(34, 34, 34);
border: none;
padding: 10px 80px;
border-radius: 5px;
cursor: pointer;
display: block;
margin: 0 auto;
}
</style>
<script src="https://kit.fontawesome.com/9569f8e091.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<div class="logo"></div>
</header>
<h1>账号登陆</h1>
<form>
<label for="username" class="control-label fa-label"><i class="fas fa-user"></i></label>
<input type="text" id="username" name="username" placeholder="输入账号">
<label for="password" class="control-label fa-label"><i class="fas fa-lock"></i></label>
<input type="password" id="password" name="password" placeholder="输入密码">
<input type="submit" value="登录">
</form>
<script>
const username = "20281166";
const password = "zsz123456";
const form = document.querySelector('form');
form.addEventListener('submit', e => {
e.preventDefault();
const enteredUsername = document.querySelector('#username').value;
const enteredPassword = document.querySelector('#password').value;
if (enteredUsername === username && enteredPassword === password) {
window.alert("登陆成功");
} else {
window.alert("账号或密码错误");
}
});
</script>
</body>
</html>