去掉FusionCharts XT Trial试用文字

   js移除FusionCharts XT Trial试用文字,不试用ie7-

移除FusionCharts XT Trial试用文字
FusionCharts XT Trial字样

移除FusionCharts XT Trial试用文字
移除FusionCharts XT Trial字样

  移除FusionCharts XT Trial试用文字源代码如下

<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <link href="/css/normalize.css" type="text/css" rel="stylesheet">
    <link href="/css/result-light.css" type="text/css" rel="stylesheet">
    <script src="http://static.fusioncharts.com/code/latest/fusioncharts.js" type="text/javascript"></script>
    <script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js" type="text/javascript"></script>
    <title>FusionCharts XT Trial字样示例</title>
<script type="text/javascript">
    window.onload = function () {
        FusionCharts.ready(function () {
            var topStores = new FusionCharts({
                type: 'bar2d',
                renderAt: 'chart-container',
                width: '400',
                height: '300',
                dataFormat: 'json',
                dataSource: {
                    "chart": {exportEnabled:1, "caption": "Top 5 Stores by Sales", "subCaption": "Last month", "yAxisName": "Sales (In USD)", "numberPrefix": "$" },
                    "data": [{ "label": "Bakersfield Central", "value": "880000" }, { "label": "Garden Groove harbour", "value": "730000" }, { "label": "Los Angeles Topanga", "value": "590000" }, { "label": "Compton-Rancho Dom", "value": "520000" }, { "label": "Daly City Serramonte", "value": "330000" }]
                }
            })
            .render();
            removeCopyRight('chart-container');
        });
    }
    window.onerror = function () { return true; };
    function removeCopyRight(id) {
        var div = document.getElementById(id);
        var el, ie8 = false;
        if (div.querySelectorAll) {
            el = div.querySelectorAll('tspan');
            if (el.length == 0) {
                ie8 = true;
                el = div.querySelectorAll('rvml\\:textpath');//ie8
            }
            for (var i = 0, j = el.length; i < j; i++) {
                if (
                   ((ie8 && el[i].string)
                    || (!ie8 && el[i].firstChild.data)
                    ) == 'FusionCharts XT Trial'
                    ) {
                    el[i].parentNode.removeChild(el[i]);;
                    break;
                }
            }
        }
    }
</script>
</head>
<body>
    <div id="chart-container"></div></body>
</html>

 

加支付宝好友偷能量挖...


原创文章,转载请注明出处:去掉FusionCharts XT Trial试用文字

评论(0)Web开发网
阅读(49)喜欢(0)JavaScript/Ajax开发技巧