bootstrap实现登录模板页⾯
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'learn/css/bootstrap.css' %}">
<script src="{% static 'learn/js/jquery-1.12.4.js' %}"></script>
<script src="{% static 'learn/js/bootstrap.js' %}"></script>
<script src="{% static 'learn/js/jquery.validate.js' %}"></script>
<script src="{% static 'learn/js/validate2.js' %}"></script>
<script src="{% static 'learn/js/main2.js' %}"></script>
</head>
<body >
<div >
<div class="container">
<form id="form01" action="{% url 'login' %}" role="form" class="form-horizontal" method="post">
{% csrf_token %}
<div class="form-group">
<label for="username" class="col-sm-2 control-label">⽤户名:</label>
<div class="col-sm-3">
<input name="username" value="{{ username }}" id="username" type="text" class="form-control" placeholder="username">
</div>
<span id="span01" >{{ err_name }}</span>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">密码:</label>
<div class="col-sm-3">
<input id="password" value="{{ password }}" name="password" type="password" class="form-control" placeholder="password">            </div>
<span id="span03" >{{ err_password }}</span>
</div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-1">
<div class="checkbox-inline">
<label><input type="checkbox" name="remember">记住⽤户名</label>
</div>
<div class="checkbox-inline">
<label><input type="checkbox" name="remember2">记住密码</label>
</div>
<div class="checkbox-inline">
<label><input type="checkbox" name="auto_login">⾃动登录</label>
</div>
<button type="submit" class="btn btn-default pull-right">登录</button>
</div>
</div>
<br>
</form>
</div>
</div>html 网页 模板 引导
</body>
</html>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。