• 个人博客


    2021年5月31日:

    昨天把模态框打开了并且做了个样例,今天准备吧所有的代码都给完善一遍,这是我的后端代码:

    @GetMapping(value = "/qiandao")
    @ResponseBody
    public List<Huodongqueren> edit2(Integer p, String club, String huo1) {
    List<Huodongqueren> list = huo.select(p, club, huo1);
    return list;
    }

    上面这段代码是我用来分页和获取社团总人数的代码,当需要分页时就会执行这段代码。

    @GetMapping(value = "/qiandao1")
    @ResponseBody
    public List<Huodongqueren> edit3(String club, String huo1) {
    List<Huodongqueren> list = huo.select1(club, huo1);
    return list;
    }

    上面这段代码就是我用来显示分子上的数据的,其作用就是显示签到的具体人数。

    $.ajax({
    url : "${pageContext.request.contextPath}/user/qiandao",
    data : "p=1&club="+$(this).attr("data-club")+"&huo1="+$(this).attr("data-huo"),
    success : function(data) {
    $.each(data,function(){
    var li=$("<li style='float: left; margin-right: 35px; 140px; margin-bottom: 50px;'></li>");
    var a=$("<a class='user-profile dropdown-toggle'></a>").attr("href","javaScript:;");
    var img=$("<img>").attr("src","${pageContext.request.contextPath}/statics/images/user/"+this.user+".jpg");
    $("#u").append(li.append(a.append(img).append(this.user)));
    })
    }
    })

    这上面一段的代码就是我来获取具体的签到成员的数据,并且显示其头像以及真实姓名。

  • 相关阅读:
    将绿色版Tomcat服务添加到系统服务并设为开机运行
    简单的递归遍历树
    js浏览器中的alert死浏览器
    Crontab文件的参数【转载】
    修改tomcat项目的图标
    最后两个and半月
    没有信的信乐团,依然让我动情
    The Network Adapter could not establish the connec
    MySql数据库的备份和恢复
    extjs
  • 原文地址:https://www.cnblogs.com/yitiaokuailedexiaojingyu/p/14874789.html
Copyright © 2020-2023  润新知