解析form表单数据
//解析form表单数据 function parseFormData(params) { var args = new Object(); for(var key in params){ if(!params[key].name) continue; var pos = params[key].name.indexOf("."); if(pos == -1){ args[params[key].name] = params[key].value; }else{ var argName = params[key].name.substring(0, pos); var argSubName = params[key].name.substring(pos + 1); args[argName] = args[argName] || {}; args[argName][argSubName] = params[key].value; } } return args; }