Jquery传数组数据到Mvc后台
var inputValue = {"activityID":ac};
$("#tableContainer").find("tr[id!='']").each(
function(index,element)
{
trIDNum = element.id.replace("tr","");
userName = $("#txtUserName"+trIDNum).val().trim();;
email = $("#txtEmail"+trIDNum).val().trim();;
dept = $("#txtDept"+trIDNum).val().trim();;
job = $("#txtJob"+trIDNum).val().trim();;
userName = $.trim(userName);
email = $.trim(email);
dept = $.trim(dept);
job = $.trim(job);
inputValue["inputValue["+index+"].UserName"] = userName;
inputValue["inputValue["+index+"].Email"] = email;
inputValue["inputValue["+index+"].Dept"] = dept;
inputValue["inputValue["+index+"].Job"] = job;
isEnable = true;
personNum++;
});
$.post("ActivityObjSelect", inputValue, function(data) { alter(data) }, "json");
}