2019年11月14日

摘要: 一般处程序返回JSON数据 1、var JsonDate = new { code = 0, count = ds.Tables[0].Rows.Count, data = ds.Tables[0], };string json = JsonConvert.SerializeObject(obj); 阅读全文
posted @ 2019-11-14 01:03 邋遢步行者 阅读(97) 评论(0) 推荐(0) 编辑
 
摘要: ajax: $.ajax({ type: 'post/get', dataType: 'json', url: '请求地址', data: data, success: function (res) { }, error: function (res) { } }); ajax传递的数据格式: 1、 阅读全文
posted @ 2019-11-14 01:01 邋遢步行者 阅读(367) 评论(0) 推荐(0) 编辑
 
摘要: 一般处理程序处理跨域 context.Response.AddHeader("Access-Control-Allow-Origin", "*"); context.Response.AddHeader("Access-Control-Allow-Methods", "GET, POST, PUT, 阅读全文
posted @ 2019-11-14 00:41 邋遢步行者 阅读(247) 评论(0) 推荐(0) 编辑
 
摘要: 转载-大牛笔记 https://www.cnblogs.com/laov/archive/2012/05/11/2495795.html 阅读全文
posted @ 2019-11-14 00:27 邋遢步行者 阅读(68) 评论(0) 推荐(0) 编辑