-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
94 lines (86 loc) · 5.34 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/login.css">
<script src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.gbtags.com/twitter-bootstrap/3.2.0/js/bootstrap.js"></script>
<title></title>
</head>
<div class="container">
<div class="row clearfix">
<div class="col-md-8 column">
<div class="carousel slide" id="carousel-558858">
<ol class="carousel-indicators">
<li data-slide-to="0" data-target="#carousel-558858" class="active"></li>
<li data-slide-to="1" data-target="#carousel-558858"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img alt="" src="images/1.jpg">
</div>
<div class="item">
<img alt="" src="images/2.gif">
</div>
</div>
<a class="left carousel-control" href="#carousel-558858" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#carousel-558858" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
</div>
<div class="col-md-4 column">
<form role="form" action="enter.php" method="post" onsubmit="return enter()">
<fieldset>
<h2>管理员登录</h2>
<hr class="colorgraph">
<div class="form-group">
<input name="username" id="username" class="form-control input-lg" placeholder="用户名" type="text">
</div>
<div class="form-group">
<input name="password" id="password" class="form-control input-lg" placeholder="密码" type="password">
</div>
<span class="button-checkbox">
<button type="button" class="btn btn-info active" data-color="info">
<i class="state-icon glyphicon glyphicon-check"></i> 记住密码</button>
<input name="remember_me" id="remember_me" checked="checked" class="hidden" type="checkbox">
<a href="http://www.gbtags.com" class="btn btn-link pull-right">忘记密码?</a>
</span>
<hr class="colorgraph">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6">
<input class="btn btn-lg btn-success btn-block" value="登录" type="submit">
</div>
<div class="col-xs-6 col-sm-6 col-md-6">
<input class="btn btn-lg btn-primary btn-block" value="注册" onclick="register();">
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script>
function enter()
{
var username=document.getElementById("username").value;//获取form中的用户名
var password=document.getElementById("password").value;
var regex=/^[/s]+$/;//声明一个判断用户名前后是否有空格的正则表达式
if(regex.test(username)||username.length==0)//判定用户名的是否前后有空格或者用户名是否为空
{
alert("用户名格式不对");
return false;
}
if(regex.test(password)||password.length==0)//同上述内容
{
alert("密码格式不对");
return false;
}
return true;
}
function register()
{
window.location.href="register.html";//跳转到注册页面
}
</script>
</html>