随笔分类 -  AJAX

关于.NET MVC4 Action 方法返回JsonResult和返回String类型的区别
摘要:首先说结论:设置返回String类型的, Response.ContentType = "application/json";等于使用JsonResult。证据 1:设置返回String类型的, Response.ContentType = "application/json"。JQ会自动把JSON... 阅读全文

posted @ 2014-09-02 23:16 六欲 阅读(16002) 评论(1) 推荐(2)

AJAX 请求经典过程
摘要:1.post var xhr = new XMLHttpRequest(); xhr.open('post',"OfficeToolType.ashx?cmd=list", true); xhr.setRequestHeader("Content-type","application/x-www- form-urlencoded"); xhr.onreadystatechange = function () { if (xhr.readyState == 4 && xhr.status == 200) 阅读全文

posted @ 2013-05-15 17:40 六欲 阅读(162) 评论(0) 推荐(0)

导航