简单的登录界面

登录界面的效果如图:


附代码:

<%@page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page isELIgnored="false" %>
<%
  String contextPath = request.getContextPath();
%>
<html>
<head>
   <link rel="stylesheet" href="<%=contextPath%>/plugins/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="<%=contextPath%>/css/common.css">
<script type="text/javascript" src="<%=contextPath%>/plugins/jquery/dist/jquery.min.js"/>
<script type="text/javascript" src="<%=contextPath%>/plugins/bootstrap/dist/js/bootstrap.min.js"></script>

    <%--<%@include file="style.jsp"%>--%>
    <script type="text/javascript">
        function get_time(){
            var date = new Date();
            var year="",month="",day="",week="",hour="",minute="",second="",val;
            year=date.getFullYear();
            month=add_zero(date.getMonth()+1);
            day=add_zero(date.getDate());
            switch (date.getDay()) {
                case 0:val="星期天";break
                case 1:val="星期一";break
                case 2:val="星期二";break
                case 3:val="星期三";break
                case 4:val="星期四";break
                case 5:val="星期五";break
                case 6:val="星期六";break
            }
            hour=add_zero(date.getHours());
            minute=add_zero(date.getMinutes());
            second=add_zero(date.getSeconds());
            $("#timetable").text(" "+year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second+" "+val);
        }

        function add_zero(temp)
        {
            if(temp<10) return "0"+temp;
            else return temp;
        }
        setInterval("get_time()",1000);

    </script>
</head>
<body>

<div class="login_container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h4 style="text-align: center">登录</h4>
        </div>
        <div class="panel-body" style="text-align: center">
            <form style="text-align: center" method="post" action="<%=request.getContextPath()%>/authority?action=login">
                <div class="form-group login-input">
                    <input type="text" class="form-control" placeholder="账号" name="username">
                </div>
                <div class="form-group login-input">
                    <input type="password" class="form-control" placeholder="密码" name="password">
                </div>
                <%--<div class="form-group" style="visibility: hidden">
                    <input type="text" name="gotoUrl" value=${requestScope.gotoUrl}>
                </div>--%>
                <div class="form-group" style="visibility: hidden">
                    <input type="text" name="gotoUrl" value="${param.gotoUrl}">
                </div>
                <div class="form-group login-input">
                    <button type="submit" class="btn btn-primary" style="width: 200px;">登录</button>
                </div>
            </form>
        </div>
        <div class="panel-footer">
            <div>Copyright © <span id="timetable"></span>  DataYes. All rights reserved.</div>
        </div>
    </div>
</div>

</body>
</html>

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值