-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.html
83 lines (79 loc) · 2.03 KB
/
signup.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
<title>注册 Majoring+</title>
<style>
body {
background-color: #3498db;
}
div {
background: white;
max-width: 500px;
width: 70%;
padding: 20px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 20px;
min-height: 200px;
min-width: 400px;
box-shadow: 0 2.3px 3px rgba(0, 0, 0, 0.015),
0 5.3px 7.1px rgba(0, 0, 0, 0.022), 0 9.6px 12.7px rgba(0, 0, 0, 0.028),
0 15.9px 21px rgba(0, 0, 0, 0.032), 0 26.2px 34.7px rgba(0, 0, 0, 0.038),
0 45.8px 60.6px rgba(0, 0, 0, 0.045), 0 99px 131px rgba(0, 0, 0, 0.06);
}
div h3 {
text-align: center;
color: #3498db;
font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}
div input[type="text"],
div input[type="password"] {
width: 100%;
height: 45px;
border: 1px solid #ccc;
padding-left: 10px;
margin: 10px 0;
margin-bottom: 25px;
border-radius: 10px;
}
div a button {
width: 100%;
height: 35px;
cursor: pointer;
background: #2980b9;
color: white;
border: 0;
border-radius: 20px;
transition: 0.15s;
}
div a:hover {
background-color: #16a085;
}
div input[type="text"]:focus {
outline: 0;
}
div input[type="password"]:focus {
outline: 0;
}
</style>
<div>
<h3>注册</h3>
<input type="text" id="email" name="email" placeholder="学号" />
<input type="text" id="pass" name="pass" placeholder="密码" />
<a href="index.html">
<button onclick="setc()">注册</button>
</a>
</div>
<script>
function setc() {
var inxh = document.getElementById("email").value;
var inpass = document.getElementById("pass").value;
if (inxh.length == 9 && inxh.startsWith("20")) {
localStorage.setItem("acc", inxh);
localStorage.setItem("pass", inpass);
alert("注册成功!");
} else {
alert("学号格式错误!");
}
console.log(document.cookie);
}
</script>