直接上代码
var objTable =layui.table.render({
elem: '#test'
,url:'/demo/table/user/'
,toolbar: '#toolbarDemo'
,cols: [[
{type:'radio'}
,{field:'id', width:80, title: 'ID', sort: true}
,{field:'username', width:80, title: '用户名'}
,{field:'sex', width:80, title: '性别', sort: true}
,{field:'city', width:80, title: '城市'}
,{field:'sign', title: '签名', minWidth: 100}
,{field:'experience', width:80, title: '积分', sort: true}
,{field:'score', width:80, title: '评分', sort: true}
,{field:'classify', width:80, title: '职业'}
,{field:'wealth', width:135, title: '财富', sort: true}
]]
,page: true
});
//获取如下
objTable.config.page.limit
objTable.config.page.curr
