前台:
$("#BtnShowChart").click(function () {
$("#content").css('display', 'none');
var queryParas = {};
queryParas.dateyear = $("#DDL_Year").val();
queryParas.datasourcetype = $("#DDL_DataType").val();
$.get('GetChartData.aspx', queryParas, function (data) {
if (data == "") {
alert("查询不到数据!");
return false;
}
var dataGet = eval(data);
showChart(dataGet.xAxis, dataGet.yAxis);
});
});
后台:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using XXXXX;
using System.Text;
namespace XXXXXXX
{
/// <summary>
/// 获取 图表数据
/// </summary>
public partial class GetChartData : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(Request.QueryString["dateyear"]) || string.IsNullOrWhiteSpace(Request.QueryString["datasourcetype"]))
{
Response.Write("");
…………………………………………………………………………<p style="COLOR: red; FONT-SIZE: 16px"><strong>原文:<a target=_blank href="http://www.verydemo.com/demo_c104_i36413.html" target="_blank">http://www.verydemo.com/demo_c104_i36413.html</a></strong></p>