/ Published in: JavaScript
Expand |
Embed | Plain Text
$.json = function(a1){ t=[]; if(typeof a1=='string') return a1; if(typeof a1=='object') for(var x in a1)t.push(x+"="+encodeURI(a1[x])); if(a1.constructor==Object) for(var i=0;i<a1.length;i++) t.push(a1[i].name+"="+encodeURIComponent(a1[i].value)); if(a1.constructor==Array) for(var i=0;i<a1.length;i++) t.push(a1[i].name+"="+encodeURIComponent(a1[i].value)); return t.join("&"); };
You need to login to post a comment.
