jquery ajax: support for dynamic data arguments, see #2806; added test/data/echoQuery.php for easier testing of sent query strings
This commit is contained in:
parent
1753ab3d82
commit
46931d3146
3 changed files with 18 additions and 1 deletions
|
@ -489,7 +489,7 @@ jQuery.extend({
|
|||
s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
|
||||
});
|
||||
else
|
||||
s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
|
||||
s.push( encodeURIComponent(j) + "=" + encodeURIComponent( jQuery.isFunction(a[j]) ? a[j]() : a[j] ) );
|
||||
|
||||
// Return the resulting serialization
|
||||
return s.join("&").replace(/%20/g, "+");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue