Java教程

layui分页

本文主要是介绍layui分页,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

table.render({

        elem: '#demo'

        ,height: 312

        ,url: '../../demo/table/user/-page=1&limit=30.js' //数据接口

        ,page: true //开启分页

        ,limit:?显示几行数据

        ,cols: [

        [ //表头

        {field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}

        ,{field: 'username', title: '用户名', width:80}

        ,{field: 'sex', title: '性别', width:80, sort: true}

        ,{field: 'city', title: '城市', width:80}

        ,{field: 'sign', title: '签名', width: 177}

        ,{field: 'experience', title: '积分', width: 80, sort: true}

        ,{field: 'score', title: '评分', width: 80, sort: true}

        ,{field: 'classify', title: '职业', width: 80}

        ,{field: 'wealth', title: '财富', width: 135, sort: true}

        ]

        ]

});

后端接受的是pege,limit和传过去的id  

这篇关于layui分页的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!