mvc控制器接收ajax传送的数据

视图层中ajax传数据

 $.ajax({
            type: "post",//提交方式
            data: { complay_arry: complay_arry, site_arry: site_arry, equipment_arry: equipment_arry, id: id },//查询的参数
            url: "/Role/DataRole",//提交的路径
            success: function (res2) {
                alert(res2.message);
                location.href = "/Role/Edit/"+id;
            }
        })

控制器接收ajax传递的数据

 

 数组也可以直接传

posted @ 2019-09-06 17:56  Saunterer  阅读(1400)  评论(0编辑  收藏  举报