我使用DhtmlGrid来解析数据,它在IE上运行良好,但无法在Chrome和FF上运行,当我调试时我看到它似乎无法解析来自Dhtml网格的数据。
这是我的档案:
-559038737 1 2 3 4 5 -1059786739
这是错误:
<link rel="stylesheet" type="text/css" href="../../css/test_style.css">
<link rel="STYLESHEET" type="text/css" href="../../dhtmlxGrid/codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../../dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_web.css">
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript" src="../../dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" src="../../dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script type="text/javascript" src="../../dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script type="text/javascript">
var qlist1_grid;
var qlist2_grid;
var qlist1_json = {};
qlist1_json.rows = [];
var qlist2_json = {};
qlist2_json.rows = [];
function qlist1_init_qlist_grid() {
qlist1_grid = new dhtmlXGridObject('qlist1_grid');
qlist1_grid.setImagePath("../../dhtmlxGrid/codebase/imgs/");
qlist1_grid.setHeader("Q Code,Q Type,Difficulty,Allotting,Question");
qlist1_grid.setInitWidths("100,80,80,80,750");
qlist1_grid.setColAlign("center,center,center,center,left");
qlist1_grid.setColTypes("ro,ro,ro,ro,ro");
qlist1_grid.setColSorting("int,str,str,str,str");
qlist1_grid.enableMultiselect(true);
qlist1_grid.attachEvent("onRowSelect", function(){
});
qlist1_grid.setStyle("text-align:center;", "","", "");
qlist1_grid.setSkin("dhx_web");
qlist1_grid.init();
}
function qlist1_reload() {
qlist1_grid.clearAll();
qlist1_grid.parse(qlist1_json,"json");
alert("run here-------");
}
...
<script>
qlist1_reload()方法中的似乎无法解析Chrome或FF上的数据
如何解决此错误?非常感谢!!