search

Home  >  Q&A  >  body text

表格中列表排序,jquery + php实现

实现列表的排序,多个字段都可以排序,如时间,id,数量等等,具体实现思路是什么呢?

阿神阿神2752 days ago692

reply all(5)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 12:04:05

    Similar to paging, I want to bind a click event to each filter area. When clicked, the field to be filtered will be obtained. Then you can get the desc or asc style of the area, and then return to the background order, return data, and display the data

    reply
    0
  • 迷茫

    迷茫2017-05-16 12:04:05

    I happened to see this case while reading "The Definitive Guide to JavaScript" this morning. I took a photo and shared it with you

    Finally just submit the return value to the server

    I also made a table sorting requirement last month. I used the AngularJS plug-in ui-grid to do it, which is very convenient

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 12:04:05

    1. If the amount of data is large and paging is required, pass the field names and sorting methods to be sorted to the backend;

    2. The amount of data is small, no paging is needed, or front-end paging can be used, and sorting can be achieved through js.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 12:04:05

    Can be sorted directly on the front end, such as the Bootstrap Datatable plug-in.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 12:04:05

    DataTables

    reply
    0
  • Cancelreply