尝试添加功能以对数据进行排序时,参数列表后缺少Uncaught SyntaxError:缺少]] << [

问题描述 投票:0回答:1
我收到错误:

参数列表后未捕获到的SyntaxError:缺少]

使用以下Javascript:

jQuery.extend(cipMonitorErrorsSettings, { loadOnStartup: true, columnDefs: [{ "mData": "createdDate", "bSortable": true, "sTitle": '<fmt:message key="card.cipErrors.createdDate"/>', "mRender": function(data, type, cipErrors) { //new return '<button class="cipSummary buttonlink createdDate">' + cipErrors.createdDate + '</button>'; //new } }, { "mData": "status", "bSortable": true, "sTitle": '<fmt:message key="card.cipErrors.status"/>' }, { "mData": "jsonRequest", "sTitle": '<fmt:message key="card.cipErrors.jsonRequest"/>' }, { "mData": "jsonResponse", "sTitle": '<fmt:message key="card.cipErrors.jsonResponse"/>' } ], editLinks: [{ //Edit selector: ".cipSummary", callback: function(target, data) { // debugger; $ { prefix } ActionFormHandler.open(data); }, disabled: $ { actionBean.restricted['RESTRICT_EDIT'] } }], postInitCallback: function() { console.log(this.container.find(".appendImage")); }, actionButtons: { exportText: '<fmt:message key="export.csv"/>' } } $(document).ready(function(data) { $('#cipTable').DataTable({ "order": [ [3, "desc"] ], "columnDefs": [{ targets: 0, data: "createdDate" }, { targets: 1, data: "status" }, { targets: 2, data: "jsonRequest" }, { targets: 3, data: "jsonResponse" } ] }) }); );
我已经检查并再次检查并尝试了很多次,但仍然无法摆脱此错误。我还添加了一个调试器,但可以找到它发生的位置。我正在尝试显示列,但按createdDate列排序。

我收到错误:参数列表后带有以下Javascript:jQuery.extend(cipMonitorErrorsSettings,{loadOnStartup:true,columnDefs:[{...

javascript syntax-error jquery-events
1个回答
1
投票
尝试这样的脚本,我删除了最后一个“);”在脚本末尾。
© www.soinside.com 2019 - 2024. All rights reserved.