把视图省.市.街道表单数据,封装成一个类,作为action参数.如下: action方法参数类型: namespace MvcApplication1.Models{ public class Customer { public string Address { get; set; } }} 在自定义ModelBinder中,接收视图表单数据,封装成Customer类. using System.Web; using System.Web.Mvc; using M…
http://jsfiddle.net/sxGtM/3/http://stackoverflow.com/questions/1184624/convert-form-data-to-js-object-with-jquery /*把表单转成json,并且name为key,value为值*/ $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { i…