<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <title>后台管理系统</title>
  <meta name="author" content="DeathGhost" />
  <link rel="stylesheet" type="text/css" href="css/style.css">
  <link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
  <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
  <script src="js/jquery.js"></script>
  <script src="easyui/jquery.easyui.min.js"></script>
  <script src="easyui/easyui-lang-zh_CN.js"></script>
  <script src="js/jquery.mCustomScrollbar.concat.min.js"></script>

</head><body>

<header>

<!--引入-->
  <jsp:include page="top.jsp"/>

 <jsp:include page="left.jsp"/>
</header>
 

<section class="rt_wrap content mCustomScrollbar">
  <div class="rt_content">
    <div class="page_title">
      <h2 class="fl">登录列表</h2>
    </div>
<!--分页按键-->
<div id="pp"></div>

<form action="" name="myform" method="post">
  <table class="table" id="show">
    <tr>
      <th>用户名字</th>
      <th>真实名字</th>
      <th>登录时间</th>
      <th>登录IP</th>
      <th>操作</th>
    </tr>
  </table>
</form>
</div>
</section>
</body>
<script type="text/javascript">
  $(function(){
    $.ajax({
      type:"get",
      url:"LoginLogServlet.do",
      async:true,
      data:{"pn":1,"ps":5},
      dataType:"json",
      success:function(data){
      showTable(data);
        }
      });
    $.ajax({
      type:"get",
      url:"countNum.do",
      async:true,
      dataType:"json",
      success:function(data){
      $("#pp").pagination({
      total:data[0],
      pageSize:data[1],
      pageList: [1,2,5,10],
      buttons: [{
        iconCls:'icon-add',
        handler:function(){alert('add')}
        },'-',{
        iconCls:'icon-save',
        handler:function(){alert('save')}
       }],
     layout:['list','first','prev','links','next','last'],
     onSelectPage:function(pageNumber, pageSize){
      $.ajax({
    type:"get",
    url:"LoginLogServlet.do",
    async:true,
    data:{"pn":pageNumber,"ps":pageSize},
    dataType:"json",
    success:function(data){
      showTable(data);
      }
    });
  }
});
}
});
});
function showTable(json){
  $("tr:gt(0)").remove();
  $.each(json,function(index,e){
  var tr=$("<tr/>");
  $("<td>").html(e.account.accountName).appendTo(tr);
  $("<td>").html(e.account.accountRealName).appendTo(tr);
  $("<td>").html(e.loginLog.loginTime).appendTo(tr);
  $("<td>").html(e.loginLog.loginIp).appendTo(tr);
  $("<td>").html("<a href='#' onclick='update("+"\""+e.loginLog.loginLogId+")'>修改</a>").appendTo(tr);
  $("#show").append(tr);
  });
}
</script>
</html>

最新文章

  1. flask-whooshalchemy需要注意的一点
  2. mongodb( 实现join)
  3. Hadoop 的子项目
  4. linux开机启动服务和chkconfig使用方法(转)
  5. 深入分析Java Web开发
  6. 利用dokan作虚拟磁盘开发
  7. jQuery遮罩插件 jquery.blockUI.js
  8. Mybatis的parameterType传入多个参数
  9. HBase的下载、安装与配置
  10. WebService接口定义及调用
  11. JavaScript限制前端页面用户表单输入
  12. yum和编译两种方式升级or降级Centos内核
  13. ajax提交出现的问题记载
  14. 9.3Django
  15. RequiresAuthentication
  16. MYSQL报警:Warning: Using a password on the command line interface can be insecure.
  17. hive1.2.1问题集锦
  18. rtx反向单点登录
  19. Python:asyncio模块学习
  20. Linux(12):期中架构(4)--- 前端部分:HTTP &amp; Nginx &amp; LNMP架构

热门文章

  1. 内网渗透bypassuac和smb溢出
  2. 机器学习实战3:逻辑logistic回归+在线学习+病马实例
  3. [CODEVS3366] 矿石
  4. Snagit卸载不彻底的问题
  5. 原生无缝Banner轮播图
  6. 存储物理页属性的PFN数据库
  7. 关于vue使用的一些小经验
  8. Go语言系列开发之延迟调用和作用域
  9. Solr导入MongoDB数据
  10. 通过反射来手写简单的ORM SQlserver