.net mvc ajax回调函数,后台取值问题
mvc3.0
我在主页面上grid,grid有一列checkbox,提交多条数据,下方有一按钮A,checkox选中几条提交几条的id,到弹出层,然后进行操作保存,提交数据[按钮B],更新数据库多条。
现在遇到的问题是:jq ajax回调函数写完了,当点击按钮A的时候会执行jq,但是我不知道怎么获取ajx提交的数据,求高人指点啊。困扰我好久了。附上jq ajax代码
//绑定回调事件 $("#batch").data("ajaxCallback", function () { var api = $gridCtin.data("treeSelect"), obj = this, $elm = api.getSelect().filter(":enabled"), t = true; if ($elm.length == 0) { alert("请选择用户!"); } $elm.each(function () { var $this = $(this), $td = $this.parents("td:first"); $td.find(":hidden").each(function () { if ($(this).attr("name").toString().split(".")[1] == "Id") { obj.data.push({ id: $(this).attr("name"), value: $(this).val() }); } }); }); });