我在jsp中使用DhtmlxGrid获取数据并在弹出窗口上显示数据,我可以在IE上运行良好,但在Chrome和Firefox上不能
这是我的JS文件(dhtmlxgrid.js):
...
document.styleSheets[0].insertRule(prefs[i]+(" {"+this.ssModifier[i]+" };"), document.styleSheets[0].cssRules.length);}};this.setColumnColor=function(clr){this.columnColor=clr.split(this.delim)
...
当我加载数据时,它不显示,我发现它在控制台浏览器上发生了一个错误:
Uncaught DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule '#qlist1_grid table.hdr td {text-align:center; };'.
at window.(anonymous function).setStyle (http://localhost:8080/QMTM_DEMO/dhtmlxGrid/codebase/dhtmlxgrid.js:282:26)
at qlist1_init_qlist_grid (http://localhost:8080/project/tman/exam/exam_make_write.jsp?id_exam=E170926092443OV:86:15)
at option_init (http://localhost:8080/project/tman/exam/exam_make_write.jsp?id_exam=E170926092443OV:71:3)
at onload (http://localhost:8080/project/tman/exam/exam_make_write.jsp?id_exam=E170926092443OV:110:47)
因为它无法加载数据,所以javascript的某些功能不活跃
如何解决此错误?