datatables 数据集中的数据存储在哪里?
Where is the data from datatables dataset stored?
假设我们有这个URL:
关于我的firebug,当我浏览数据集(例如"next")或更改显示的项目时,没有网络activity。
这对我来说意味着必须从头加载数据。
我对网站源代码的研究没有成功。
谁能告诉我数据集中所有数据的存储位置?
根据 documentation:
DataTables can obtain data from four different fundamental sources:
- HTML document (DOM)
- Javascript (array / objects)
- Ajax sourced data with client-side processing
- Ajax sourced data with server-side processing
Which of these options is used to populate the table with data depends upon how the table is initialised.
在该特定页面上,他们使用来自变量和数据的 Javascript 源,这些变量和数据实际上与 html.
一起加载
他们首先构造了一个名为statsArray
的数组。然后迭代这个数组,在循环中声明变量,最后使用函数 fnAddData()
将数据加载到 table (第 177 行):
$('#table_id').dataTable().fnAddData( [
[desc,recl, inv, comp, tsbs]
]);
假设我们有这个URL:
关于我的firebug,当我浏览数据集(例如"next")或更改显示的项目时,没有网络activity。
这对我来说意味着必须从头加载数据。 我对网站源代码的研究没有成功。
谁能告诉我数据集中所有数据的存储位置?
根据 documentation:
DataTables can obtain data from four different fundamental sources:
- HTML document (DOM)
- Javascript (array / objects)
- Ajax sourced data with client-side processing
- Ajax sourced data with server-side processing
Which of these options is used to populate the table with data depends upon how the table is initialised.
在该特定页面上,他们使用来自变量和数据的 Javascript 源,这些变量和数据实际上与 html.
一起加载他们首先构造了一个名为statsArray
的数组。然后迭代这个数组,在循环中声明变量,最后使用函数 fnAddData()
将数据加载到 table (第 177 行):
$('#table_id').dataTable().fnAddData( [
[desc,recl, inv, comp, tsbs]
]);