How do I move up and down the data in the list?
How do I move up and down the data in the list?
Move the sort, the database set the Sort field, this field is added by default is the creation timestamp, the list default is by the creation time in reverse order.
Now I'm thinking how to get the data ID of the uplink or downlink in the page?
------Solution--------------------
The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
------Solution--------------------
References:
Reference: The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
Data ID Operations
A 1 Move Up down
B 2 Move Up down
C 3 Move Up down
My idea is to click on B to move up, then pass the ID value of B and a to the processing text ...
This is the page operation, with JS to achieve
------Solution--------------------
References:
Reference: The sort field is saved as 1 2 3 4 by creation time ...
And then 2 down you let 2 turn 3 3 into 2 then you can.
Two data statements
Data ID Operations
A 1 Move Up down
B 2 Move Up down
C 3 Move Up down
My idea is to click on B to move up, then pass the ID value of B and a to the processing text ...
After clicking the button, it is to send Ajax asynchronous to operate, so that the page does not refresh, and to achieve the effect of moving up ~