SyntaxError: missing ; before statement

qq_34954574 2016-07-08 08:36:11
function compToDashboardAfter(panel_id,type){
if(type=='chart_line' || type=='chart_column' || type=='chart_area' || type=='chart_pie'){
return true;
var chart = $("#"+panel_id+' .chart_container').highcharts();
chart.options.series = []; //var chart.options.series = new Array();
$.each(chart.series,function(k,v){
chart.series[0].remove();});
SyntaxError: missing ; before statement
错误 chart.options.series = [];
...全文
241 1 打赏 收藏 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
ayzen1988 2016-07-09
  • 打赏
  • 举报
回复
把代码贴全,格式化一下再贴

function compToDashboardAfter(panel_id, type) {
    if (type == 'chart_line' || type == 'chart_column' || type == 'chart_area' || type == 'chart_pie') {
        return true;
        var chart = $("#" + panel_id + ' .chart_container').highcharts();
        chart.options.series = []; //var chart.options.series = new Array();	
        $.each(chart.series,
        function(k, v) {
            chart.series[0].remove();
        });

87,984

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧