您当前的位置: 首页 > 

Uncaught SyntaxError: Invalid or unexpected token

发布时间:2017-09-05 12:37:11 ,浏览量:0

Uncaught SyntaxError: Invalid or unexpected token

无效或意外的标记

产生错误的代码:注意 dataSource 一行

//中心区域初始化
        $('#grid').omGrid({
            dataSource : '${ctx}/webapi/carousel/findPage.do?timestamp=" + new Date().getTime(),
            height :  $(window).height()-61,
            width : 'fit',
            limit : 20,
            singleSelect : false,
            title : '${typeFName}列表',
            colModel : [
                         {header : '${typeSName}标题', name : 'title', width : 400, align : 'left' }, 
                         {header : '发布时间', name : 'createTimeString', width : 160, align : 'left' }, 
                         {header : '序号', name : 'oid', width : 100, align : 'left' }
                       ],
            
            onRowSelect : function(index, data){
    			if($.inArray(data.id, selectIds)== -1)
           			selectIds.push(data.id);
    		},
    		onRowDeselect : function(index, data){
    			var i = $.inArray(data.id, selectIds);
    			selectIds.splice(i,1);
    		}
        });
你发现了吗?
'${ctx}/webapi/carousel/findPage.do?timestamp="
前面是单引号,后面是双引号!

引号、小括号、中括号、花括号等没有成对的出现,就导致了这个错误。

相关阅读:

Uncaught SyntaxError: Unexpected token ILLEGAL

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    109966博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.3927s