datatables 使用

TypeNameInfo
intiDisplayStartDisplay start point
intiDisplayLengthNumber of records to display
intiColumnsNumber of columns being displayed (useful for getting individual column search info)
stringsSearchGlobal search field
booleanbEscapeRegexGlobal search is regex or not
booleanbSortable_(int) Indicator for if a column is flagged as sortable or not on the client-side
booleanbSearchable_(int) Indicator for if a column is flagged as searchable or not on the client-side
stringsSearch_(int) Individual column filter
booleanbEscapeRegex_(int) Individual column filter is regex or not
intiSortingColsNumber of columns to sort on
intiSortCol_(int) Column being sorted on (you will need to decode this number for your database)
stringsSortDir_(int) Direction to be sorted - "desc" or "asc". Note that the prefix for this variable is wrong in 1.5.x where iSortDir_(int) was used)
stringsEcho

Information for DataTables to use for rendering

 

发送到server中的data字段

In reply to each request for information that DataTables makes to the server, it expects to get a well formed JSON object with the following parameters.

TypeNameInfo
intiTotalRecordsTotal records, before filtering (i.e. the total number of records in the database)
intiTotalDisplayRecordsTotal records, after filtering (i.e. the total number of records after filtering has been applied - not just the number of records being returned in this result set)
stringsEchoAn unaltered copy of sEcho sent from the client side. This parameter will change with each draw (it is basically a draw count) - so it is important that this is implemented. Note that it strongly recommended for security reasons that you 'cast' this parameter to an integer in order to prevent Cross Site Scripting (XSS) attacks.
stringsColumnsOptional - this is a string of column names, comma separated (used in combination with sName) which will allow DataTables to reorder data on the client-side if required for display
array array mixedaaDataThe data in a 2D array

返回页面的数据(.JSON)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值