正交数据,这个直译过来不怎么理解,找了些资料还是不怎么理解,贴单一句英文解释(
地址)
In computer terminology, something - such as a programming language or a data object - is orthogonal if it can be used without consideration as to how its use will affect something else.
该例子的数据模型如下:
{ "name": "Tiger Nixon", "position": "System Architect", "salary": "$3,120", "start_date": { "display": "Mon 25th Apr 11", "timestamp": "1303682400" }, "office": "Edinburgh", "extn": "5421" }
Name | Position | Office | Extn. | Start date | Salary |
---|---|---|---|---|---|
Name | Position | Office | Extn. | Start date | Salary |
$(document).ready(function() { $('#example').dataTable( { ajax: "data/orthogonal.txt", columns: [ { data: "name" }, { data: "position" }, { data: "office" }, { data: "extn" }, { data: { _: "start_date.display", sort: "start_date.timestamp" } }, { data: "salary" } ] } ); } );
<table id="example" class="display" cellspacing="0" width="100%"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Extn.</th> <th>Start date</th> <th>Salary</th> </tr> </thead> <tfoot> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Extn.</th> <th>Start date</th> <th>Salary</th> </tr> </tfoot> </table>
Translation from DataTables.net, with permission