1

我有这样的代码:

            <html>
        <head>
    <title><%=sAtaskaitaTitle%></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
    <link rel="stylesheet" type="text/css" href="style.css">
    <style type=text/css>
            TH, TD.clTD, TABLE.thinTable 
            {
                border-right: 1px solid;
                border-top: 1px solid;
                border-left: 1px solid;
                border-bottom: 1px solid;
            }
    </style>
    <script language="vbscript">

        Sub OnLoadFunc()
            self.moveTo 0,0
            self.resizeTo window.screen.availWidth,window.screen.availHeight
            document.all.btnclose.focus()
        End Sub

    </script>

    <script type="text/javascript" src="javascript_charts/jquery.min.js"></script>
    <script type="text/javascript">
    $(function () {
var chart;
$(document).ready(function() {
    chart = new Highcharts.Chart({
        chart: {
            renderTo: 'container',
            type: 'column',
            margin: [ 50, 50, 100, 80]
        },
        title: {
            text: 'World\'s largest cities per 2008'
        },
        xAxis: {
            categories: [
                'Tokyo',
                'Jakarta'
            ],
            labels: {
                rotation: -45,
                align: 'right',
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            }
        },
        yAxis: {
            min: 0,
            title: {
                text: 'Population (millions)'
            }
        },
        legend: {
            enabled: false
        },
        tooltip: {
            formatter: function() {
                return '<b>'+ this.x +'</b><br/>'+
                    'Population in 2008: '+ Highcharts.numberFormat(this.y, 1) +
                    ' millions';
            }
        },
        series: [{
            name: 'Population',
            data: [34.4, 21.8],
            dataLabels: {
                enabled: true,
                rotation: -90,
                color: '#FFFFFF',
                align: 'right',
                x: 4,
                y: 10,
                style: {
                    fontSize: '13px',
                    fontFamily: 'Verdana, sans-serif'
                }
            }
        }]
    });
});

});
</script>

</head>

<body onload="OnLoadFunc">

    <form id="FORM1" method="post" action="par_atask01.asp">
    <input type="hidden" name="CMD" id="CMD" value="">
    <table width="100%" style="position:absolute;top:10pt;left:10pt;" id="Table1">
        <tr>
            <td nowrap colspan="4" align="left">
                <input type="button"  name="btnclose" style="position:relative;" value=" &nbsp; &nbsp; &nbsp;Grįžti &nbsp; &nbsp; &nbsp;" onclick="window.close()" id="btnclose">
                <input type="button"  value="&nbsp;Spausdinti&nbsp;" name="btnprint" id="btnprint" language="VBscript" onclick="window.print()">
            </td>
        </tr>
        <tr>
            <td align="center" style="font-size:13px;">
                <b><i><%=sAtaskaitaTitle%></i></b>
                <br>
                <%=Left(Now(),10)%>
                <br>
            </td>
        </tr>
        <tr>
            <td>
                <%=GetAtaskaitaInfo(VYKDYTOJAS_SBJ_ID,KONTROLIERIUS_SBJ_ID)%>
            </td>
        </tr>
        <tr>
            <td>
                <br>

            </td>
        </tr>
    </table>
    </form>
    <br>

    <script src="javascript_charts/highcharts.js"></script>
    <script src="javascript_charts/exporting.js"></script>

    <div id='container' style='min-width: 400px; height: 400px; margin: 0 auto'></div>
</body>

我收到这样的错误:

SCRIPT1024: Expected statement 
highcharts.js, line 1 character 1
SCRIPT1024: Expected statement 
exporting.js, line 1 character 1
SCRIPT5009: 'Highcharts' is undefined 
par_atask01.asp, line 105 character 9
SCRIPT5009: 'Highcharts' is undefined 
par_atask01.asp, line 105 character 9

我根本没有更改 javascript 文件。路径定义正确。那么有什么理由呢?

4

2 回答 2

2

在黑暗中拍摄,将缺少的类型添加到脚本标签中。

<script type="text/javascript" src="javascript_charts/highcharts.js"></script>
<script type="text/javascript" src="javascript_charts/exporting.js"></script>

设置类型,因为您只使用 IE VBScript。我想知道它是否认为您在那里使用 VBScript。

于 2013-02-20T22:18:19.483 回答
0

你在定义 Highchartsjavascript_charts/highcharts.js吗?如果是这样,请确保您没有在命名空间中执行此操作。

于 2013-02-20T22:19:11.750 回答