zoukankan      html  css  js  c++  java
  • 客户端

    <!DOCTYPE html>
    <html>
    <head>
    <title>MyHtml.html</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    
    </head>
    <body>
        <!--      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> 
          <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
          <script type="text/javascript" src="../js/highcharts.js"></script>-->
        <script src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
        <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
        <script type="text/javascript">
        var json;
            $(function() {
                $('#show-button').on('click', function(e) {
                    showChart();
                });
            });
    
            var chart;
            function showChart() {
                $.ajax({
                    url : "servlet/Charts",
                    type : "POST",
                    dataType : "json",
                    data : {
                        "que" : $("#inputque").val()
                    },
                    success : function(data) {
                        json = eval(data);
                        if (json != "" && json != null) {
                            chart = new Highcharts.Chart({
                                chart : {
                                    renderTo : 'container',
                                    type : 'line'
                                },
                                title : {
                                    text : '话题趋势分析'
                                },
                                subtitle : {
                                    text : ''
                                },
                                xAxis : {
    
                                    categories : json.categories,
                                    id : 'temperature-axis'
                                },
                                yAxis : {
                                    title : {
                                        text : '百分比 (%)'
                                    },
                                    min : 0
                                },
                                plotOptions : {
                                    line : {
                                        dataLabels : {
                                            enabled : true
                                        },
                                        enableMouseTracking : true
                                    }
                                },
                                tooltip : {
                                    formatter : function() {
                                        return '<b>' + this.series.name + '出现在'
                                                + '</b><br/>' + this.x + ': '
                                                + this.y + '';
                                    }
                                },
                                series : json.series
    
                            });
                        }
                        $("#text").val(json.aaf); 
                        
                    },
                    error : function() {
                        alert('error!');
                    }
                });
            }
    
            //document.getElementByIdx_x("text").value = json.aaf;
            //document.getElementById("text").InnerText = "xxx"; 
    
        </script>
    
    
        <div style="margin:auto;text-align:center;">
            <div style="padding:10px;">
                <input type="text" name="que" id="inputque"> <input
                    type="button" id="show-button" value=" Test Highcharts " />
            </div>
    
    
            <div id="container"
                style="height:480px;980px;background-color:#efefef;"></div>
            <textarea name="yj" rows="5" cols="20" wrap="hard" id = "text">
            </textarea>
            <a href="<%=request.getContextPath()%>/show.jsp"><input type="button"></input></a>
            
        </div>
        
        
    
        
    </body>
    </html>
  • 相关阅读:
    SQL SERVER2017 安装程序无法与下载服务器联系。无法安装机器学习服务的问题解决方式
    Kali Linux无法访问网络的问题
    Vue的冒泡事件
    记录阿里云ECS(Centos7.4)安装mysql 8.0.X服务
    沧桑巨变中焕发青春活力-记极1s HC5661A 打怪升级之路
    Asp.Net MVC过滤器小试牛刀
    C# Windows Service调用IBM Lotus Notes发送邮件
    记录一些js框架用途
    vc14(vs2015) 编译php7 记录
    C++ API方式连接mysql数据库实现增删改查
  • 原文地址:https://www.cnblogs.com/XDJjy/p/4534508.html
Copyright © 2011-2022 走看看