//查询角色 public ActionResult Role_query(string rolename) { List <Role> roles = dbDrive.QueryRoles(rolename); //code--信息状态,默认为0,msg--返回信息,count--数据条数,data--数据 return(Json(new { code = 0, msg = "", count = roles.Count, data = roles }, JsonRequestBehavior.AllowGet)); }