//获取http通过post传来的json数据 using Newtonsoft.Json; public HttpResponseMessage Query() { var request=System.Web.HttpContext.Current.Request; byte[] requestData=new byte[request.InputStream.Length]; request.InputStream.Read(requestData,0,(int)request.Input
封装好的:ajax.js function ajax(url, fnSucc,fnFaild){ //1[创建] if(window.XMLHttpRequest){ var oAjax = new XMLHttpRequest(); }else{ var oAjax = new ActiveXObject("Microsoft.XMLHTTP"); }; //2: [连接]true:表示异步 oAjax.open('GET',url,true); //3:[发送] oAjax.sen
动态获取数据说白点就是从后台传值到前台,前台把这些值赋值给x轴与y轴(这里指的是你X轴与Y轴都是变化的数据,如果你的X轴是固定的,像时间等等的那就另说). 柱状图的动态传值: //获取后台数据 var x = [];//X轴 var y = [];//Y轴 var xtext = [];//X轴TEXT var color = ["#FFB6C1","#DC143C","#C71585","#D8BFD8","#8