How does one implement the data move up and down functions in the list? How does one implement the data move up and down functions in the list? The sort field is set in the database for mobile sorting. when this field is added, the creation timestamp is used by default, and the list is sorted by creation time in reverse order by default. What I want now is how to get the upstream or downstream data id & nbsp; on the page ;? ------ Solution -------------------- how does sort implement the function of moving up and down data in the list?
How does one implement the data move up and down functions in the list?
The sort field is set in the database for mobile sorting. when this field is added, the creation timestamp is used by default, and the list is sorted by creation time in reverse order by default.
How can I obtain the upstream or downstream data id on the page?
------ Solution --------------------
Save the sort field as 1 2 3 4...
Then move 2 down and you will change 2 to 3 and 3 to 2 ~
Two data statements
------ Solution --------------------
Reference:
Reference: the sort field is saved as 1 2 3 4 according to the creation time...
Then move 2 down and you will change 2 to 3 and 3 to 2 ~
Two data statements
Data id operation
A 1 move up and down
B 2 move up and down
C 3 move up and down
My idea is to click B's move up, and then pass the id values of B and a to review the text ......
This is a page operation, implemented using js
------ Solution --------------------
Reference:
Reference: the sort field is saved as 1 2 3 4 according to the creation time...
Then move 2 down and you will change 2 to 3 and 3 to 2 ~
Two data statements
Data id operation
A 1 move up and down
B 2 move up and down
C 3 move up and down
My idea is to click B's move up, and then pass the id values of B and a to review the text ......
After you click the button, you need to send ajax asynchronous operations to ensure that the page is not refreshed and the up-shift effect is achieved ~