https://github.com/DataTables/DataTablesjquery
DataTables is a table enhancing plug-in for the jQuery Javascript library, adding sorting, paging and filtering abilities to plain HTML tables with minimal effort. The stated goal of DataTables is:git
To enhance the accessibility of data in HTML tables.github
To meet this goal, DataTables is developed with two distinct groups of users in mind:ajax
You the developers using DataTables. For developers DataTables provides a wide array of options for how data should be obtained, displayed and acted upon, along with an extensive API for accessing and manipulating the table.ide
End users. For those using the interface DataTables presents, actions to get the most from the information contained in tables, such as sorting and filtering, along with paging and scrolling of the data in table, are easy to use, intuitive and fast.ui
It's important that your THEAD not be empty in table.As dataTable requires you to specify the number of columns of the expected data . As per your data it should bespa
<table id="datatable"> <thead> <tr> <th>Subscriber ID</th> <th>Install Location</th> <th>Subscriber Name</th> <th>some data</th> </tr> </thead> </table>
bLengthChange: false,
searching: false,.net
https://datatables.net/manual/ajaxcode
和ajax的返回值有關係