怎么用limit,offset分页?
这是表格内容:<table class="table table-hover table-striped" style="width: 800px;">
<thead>
<tr>
<td style="width: 100px">账号</td>
<td style="width: 100px">密码</td>
<td style="width: 100px">别名</td>
</tr>
</thead>
<tbody id="basicinfo-user-list"></tbody>
</table>
表格数据:
condition: {
offset: 0,
limit: 20,
},
listUser: function(condition) {
$.post(appServer + '/user/listuser', JSON.stringify(condition), function(res) {
$('#basicinfo-user-list').html('');
var data = res.data || [];
for (var i = 0; i < data.length; i ++) {
$tr = $('<tr>');
$('<td>').html(data[i].account).appendTo($tr);
$('<td>').html(data[i].password).appendTo($tr);
$('<td>').html(data[i].nickname).appendTo($tr);
$tr.appendTo('#basicinfo-user-list');
}
});
}
想问怎么分页啊?代码不会写啊。。。