标签:
//解析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; }
标签:
原文地址:http://www.cnblogs.com/xingmeng/p/4427752.html