How does jquery.datatables realize binding data and paging data display?

the requested data is as follows


    <thead>
        <tr>
            <th>Column 1</th>
            <th>Column 2</th>
        </tr>
    </thead>
    <tbody>
    </tbody>
</table>

the json value put back at the backend is like this

  • Page of page:1
  • size:10 displays several entries per page
  • totalPage: 3, a total of several pages
  • totalElements: 21, a total of several pieces of data

then how to bind the data and display it? I want to use the datatables plug-in to directly help me display and paginate the data.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30ed4-2bd4e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30ed4-2bd4e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?