if (!this.JSON) { JSON = {}; } (function () { //增加的对 struts2的支持 postArgument = ""; //post argument global function str2(key, holder){ var i, // The loop counter. k, // The member key. v, // The member value. value = holder[key]; if(key!=""){ postArgument = postArgument + key +"="+ value + "&"; } if (!value) { return 'null'; } for (k in value) { if (Object.hasOwnProperty.call(value, k)) { str2(k, value); } } } if (typeof JSON.struts2 !== 'function') { JSON.struts2 = function (value) { postArgument = "";//clean postArgument here case save postArg can hold several record and update str2('', {'': value}); return postArgument.substr(0,postArgument.length-1); } }