如何将序列化日期与带有 jquery 的数组合并为 ajax post?
例如,
var array = { name: "John", time: "2pm" };
$.post( "page.php", $("form").serialize() + array);
我明白了,
Array
(
[url] => another test
[page_id] => 140
[method] => update[object Object]
)
我该怎么做才能合并它们并将其作为下面的结果?
Array
(
[url] => another test
[page_id] => 140
[method] => update
[name] => John
[time] => 2pm
)