标签:style blog http color io os java ar div
Javascript
var values = $(‘#datatable input.gid:checked‘).map(function () { return $(this).attr(‘gid‘); }).get(); $.ajax({ type: "POST", url: ‘/trade/audit/goodspass?t=‘ + new Date().getTime(), data: { ids: values }, traditional: true, success: function(msg){ alert(msg); } });
C#
[HttpPost] public ActionResult GoodsPass(ICollection<long> ids) { if(null == ids || ids.Count < 1) return Content("请选择一项"); return Content("0"); }
jquery ajax post 多选框值到MVC Model binder
标签:style blog http color io os java ar div
原文地址:http://www.cnblogs.com/eyu/p/ajax_post_multiple_check_value_2_mvc_model_binder.html