更新时间:2023-02-25 15:09:03
如果你正在使用jQuery,那么你可以使用 jQuery.param ()功能:
If you're using jQuery, then you can use the jQuery.param() function:
var obj = { "foo":"bar", "baz":"boom", "php":"hypertext processor" };
var str = jQuery.param(obj);
alert(str); // should be "foo=bar&baz=boom&php=hypertext+processor"
它可以序列化一些复杂的数组。
It can serialise some complex arrays too.