-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path张燚-20281234.html
71 lines (66 loc) · 1.64 KB
/
张燚-20281234.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>login/20281234</title>
</head>
<style type="text/css">
body {
margin-top:100px;
margin-bottom:100px;
margin-right:50px;
margin-left:50px;
}
h1 {color: rgb(173, 173, 30);
background-color: blue;
font-style: italic;
width: 400px;
}
table {
background-color: rgb(187, 143, 67);
border-collapse:collapse;
width:400px;
height: 100px;
padding:15px;
}
}
</style>
<body>
<h1>Welcome to 美团</h1>
<div class="log">
<table>
<tbody>
<tr>
<th>account</th>
<td><input name="account" id="acc"></td>
</tr>
<tr>
<th>password</th>
<td><input type="password" name="password" id="pass"></td>
</tr>
<tr>
<td colspan="2">
<input type="button" value="登录" onclick="login()" >
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
<script>
const useraccount = "zy"
const userpass = "1"
const login = () => {
const acc = document.getElementById("acc").value
const pass = document.getElementById("pass").value
if(useraccount === acc && userpass === pass)
{
window.alert("登录成功!")
} else {
window.alert("登录失败!")
}
}
</script>