-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreg.html
36 lines (36 loc) · 1.49 KB
/
reg.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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>注册</title>
<link rel="stylesheet" type="text/css" href="/css/login.css">
</head>
<body>
<div class="container">
<div class="login-wrapper" style="height: 550px;">
<div class="header">注册</div>
<div class="form-wrapper">
<form action="/page/reg" method="post" onsubmit="return regCheck();">
<input type="text" name="username" id="username" placeholder="请输入用户名" class="input-item" required />
<input type="password" name="password" id="password" placeholder="请输入密码" class="input-item" required />
<input type="password" name="repassword" id="repassword" placeholder="请再输入一次密码" class="input-item" required />
<button type="submit" style="width:100%;margin-top:40px;"><div id="login" class="btn">注册</div></button>
</form>
</div>
<div class="msg">
已有账户? <a href="login.html">点击登录</a>
</div>
</div>
</div>
<script>
function regCheck(){
if(document.getElementById('password').value != document.getElementById('repassword').value){
alert("两次密码输入不一致");
return false;
}
return true;
}
</script>
</body>
</html>