本文共 467 字,大约阅读时间需要 1 分钟。
serialize : function (param){ var s = new Array(); for(var k in param){ s[ s.length ] = encodeURIComponent(k) + '=' + encodeURIComponent(param[k]); } return s.join("&").replace(/%20/g, "+"); }, serialize : function (param){ var s = new Array(); for(var k in param){ s.push(encodeURIComponent(k) + '=' + encodeURIComponent(param[k])); } return s.join("&").replace(/%20/g, "+"); } 转载于:https://www.cnblogs.com/kingwolf_JavaScript/archive/2012/05/17/js_dom_serialize.html