diff --git a/core-xhr.html b/core-xhr.html index dbc531b..0a7ef4d 100644 --- a/core-xhr.html +++ b/core-xhr.html @@ -77,7 +77,13 @@ for (var n in params) { var v = params[n]; n = encodeURIComponent(n); - r.push(v == null ? n : (n + '=' + encodeURIComponent(v))); + if (Array.isArray(v)) { + v.forEach(function(val) { + r.push(val == null ? n : (n + '=' + encodeURIComponent(val))); + }); + } else { + r.push(v == null ? n : (n + '=' + encodeURIComponent(v))); + } } return r.join('&'); }, diff --git a/test/core-ajax-multivalue.html b/test/core-ajax-multivalue.html new file mode 100644 index 0000000..c56e88b --- /dev/null +++ b/test/core-ajax-multivalue.html @@ -0,0 +1,59 @@ + + + +
+