forked from mt-bjtu-practical/Front-end-exercise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path胡琬亭 20281078.html
65 lines (59 loc) · 1.17 KB
/
胡琬亭 20281078.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>账号登录</title>
</head>
<style>
body{
font-size: 20px;
margin: 0px;
padding: 0px;
background: url("logo.gif");
background-repeat: no-repeat;
background-position: right,bottom;
background-color:beige;
}
input {
border: 1px solid black;
border-radius:20px;
line-height: 25px;
}
.btn{
width:70px;
height:30px;
color:blue;
font-size:28sp;
border:1px solid black;
border-radius:20px;
}
.btn:link .btn:VISITED {
background-color: #F0F0F0;
}
.btn:HOVER {
background-color:aliceblue;
}
</style>
<body>
<label>账号</label><br>
<input id="user"><br>
<label>密码</label><br>
<input id="password"><br><br>
<button onclick="myFunction()">登录</button>
</body>
<script>
function myFunction() {
if (document.getElementById("user").value == "user") {
if (document.getElementById("password").value == "123123") {
alert("登录成功");
}
else {
alert("密码错误");
}
}
else {
alert("账号密码均有误");
}
}
</script>
</html>