该代码不适用于使用SEWP的SP在线网站页面

code wont work for SP online site page using SEWP

本文关键字:在线 SP 网站 SEWP 不适用 代码 适用于      更新时间:2023-09-26

如果我在prem网站上的SP 2013上使用,但在SharePoint Online网站上不使用,这将正常工作并执行。它有时会以在线编辑模式显示,但在我保存后就会消失……我使用过内容和脚本编辑器。有什么想法吗??

<script language = "javascript" src="http://code.highcharts.com/highcharts.js">
<script language = "javascript" src="http://code.highcharts.com/modules/exporting.js"></script>  
<script type="text/javascript">
$(function () {
$('#container').highcharts({
    chart: {
        plotBackgroundColor: null,
        plotBorderWidth: null,
        plotShadow: false
    },
    title: {
        text: 'Browser market shares at a specific website, 2014'
    },
    tooltip: {
        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
        pie: {
            allowPointSelect: true,
            cursor: 'pointer',
            dataLabels: {
                enabled: true,
                format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                style: {
                    color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                }
            }
        }
    },
    series: [{
        type: 'pie',
        name: 'Browser share',
        data: [
            ['Firefox',   45.0],
            ['IE',       26.8],
            {
                name: 'Chrome',
                y: 12.8,
                sliced: true,
                selected: true
            },
            ['Safari',    8.5],
            ['Opera',     6.2],
            ['Others',   0.7]
        ]
    }]
});
</script>

禁用功能Minimun下载策略