1. When a space exists in the parameter, the space in the obtained value is replaced with the plus sign: +
2. If the value of a key does not exist, the obtained value is true instead of null or null.
You have found a solution on the Internet. For more information, see (whether there are other side effects that have not been tested yet)
1. Change the space to the plus sign +
Find the following code in the jQuery. query. js file:
Copy codeThe Code is as follows:
ToString: function (){
Var I = 0, queryString = [], chunks = [], self = this;
Var encode = function (str ){
Str = str + "";
// If ($ spaces) str = str. replace (// g, "+ ");
Return encodeURIComponent (str );
};
Comment out if ($ spaces) str = str. replace (// g, "+"); that line.
2. Empty value
Copy codeThe Code is as follows:
Get: function (key)
{
Var target = this. GET (key );
If (typeof (target) = 'boolean ')
Return '';
If (is (target, Object ))
Return jQuery. extend (true, {}, target );
Else if (is (target, Array ))
Return target. slice (0 );
Return target;
},
Add if (typeof (target) = 'boolean') return '';