web/jsp/ForeGrade.jsp

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%--
  Created by IntelliJ IDEA.
  User: lingshao
  Date: 2020/9/15
  Time: 19:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>学员成绩表</title>
    <link rel="stylesheet" href="../layui/layui/css/layui.css" media="all">

    <script src="../layui/layui/layui.js"></script>
    <style type="text/css">
        *{
            font-size: 20px;
            font-family: 微软雅黑;
        }
    </style>
</head>
<body>

<blockquote class="layui-elem-quote news_search">

    <%--展示表格--%>
    <table id="demo" lay-filter="test"></table>
</blockquote>

<script>
    layui.use('table', function(){
        var table = layui.table;

        //第一个实例
        table.render({
            elem: '#demo'
            ,height:550
            ,cellMinWidth: 80
            ,url: '../ForeStudentGradeServlet?method=findGrade' //数据接口
            , limits: [5,10,15,20]  //一页选择显示3,5或10条数据
            , limit: 5  //一页显示10条数据
            , parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
                var result;
                console.log(this);
                console.log(JSON.stringify(res));
                if (this.page.curr) {
                    result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
                }
                else {
                    result = res.data.slice(0, this.limit);
                }
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": res.count, //解析数据长度
                    "data": result //解析数据列表
                };
            }
后面还有 13 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。