📅  最后修改于: 2022-03-11 15:03:21.989000             🧑  作者: Mango
$("#list").sortable({
update : function () {
var neworder = new Array();
$('#list li').each(function() {
//get the id
var id = $(this).attr("id");
//create an object
var obj = {};
//insert the id into the object
obj[] = id;
//push the object into the array
neworder.push(obj);
});
$.post("pagewhereyouuselist.php",{'neworder': neworder},function(data){});
}
});