【发布时间】:2011-04-27 19:18:36
【问题描述】:
我正在使用 Mootools Sortables 对列表进行排序,并且我正在序列化数据并使用修饰符,以便数据更有用。这是我的代码
var order = mySortableTable.serialize(0, function(element, index){
return 'item=' + index;
}).join('&');
这应该根据列表的顺序返回“item=0&item=2&item=1”(显然标签“item”不是很有用,但我会在函数正常工作时替换它)。
这没有按预期工作,返回的只是没有项目标签的“0&2&1”。此代码直接取自 Mootools 文档,因此它应该可以工作,但不能。有人知道为什么这不能正常工作吗?
非常感谢您的帮助!
【问题讨论】:
标签: serialization mootools sortables