JQuery Datatables。如何以编程方式更改当前页面? [英] JQuery Datatables. How can I change the current page programmatically?

查看:79
本文介绍了JQuery Datatables。如何以编程方式更改当前页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的桌子上有分页。每当调用函数时,我都希望回到第一页。我该怎么做?

解决方案

从文档: http://datatables.net/ref#fnPageChange

  $(document).ready(function (){
var oTable = $('#example')。dataTable();
oTable.fnPageChange('first');
});


I have pagination on my table. I want go back back to the first page whenever a function is called. How can I do that?

解决方案

from the docs: http://datatables.net/ref#fnPageChange

$(document).ready(function() {
  var oTable = $('#example').dataTable();
  oTable.fnPageChange( 'first' );
} );

这篇关于JQuery Datatables。如何以编程方式更改当前页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆