瀡缘懿切 瀡缘懿切
挥一挥匕首,不留一个活口。
关注数: 1 粉丝数: 127 发帖数: 166 关注贴吧数: 20
easyui在使用loadData方法加载本地对象时报错,求大神帮忙看一下 源码如下: <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'table.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <link rel="stylesheet" type="text/css" href="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.jeasyui.com%2Feasyui%2Fthemes%2Fdefault%2Feasyui.css&urlrefer=98ba6df44de5030a0597e37b675e18eb"> <link rel="stylesheet" type="text/css" href="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.jeasyui.com%2Feasyui%2Fthemes%2Ficon.css&urlrefer=ff3dc0035c3e70790a5a14240e7d8f0b"> <link rel="stylesheet" type="text/css" href="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.jeasyui.com%2Feasyui%2Fthemes%2Fcolor.css&urlrefer=8ed9bb4fe6a7090b5b47a4d9c69cb382"> <link rel="stylesheet" type="text/css" href="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.jeasyui.com%2Feasyui%2Fdemo%2Fdemo.css&urlrefer=680771ab03bf66e358a9536554c5d995"> <script type="text/javascript" src="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fcode.jquery.com%2Fjquery-1.6.min.js&urlrefer=429aa1dfcec7f76f345dc1f2d8f36239"></script> <script type="text/javascript" src="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.jeasyui.com%2Feasyui%2Fjquery.easyui.min.js&urlrefer=633e70494d089db976ffd73fe1f0f6ea"></script> <script type="text/javascript"> </script> </head> <body> <h2>DataGrid with Toolbar</h2> <p>Put buttons on top toolbar of DataGrid.</p> <div style="margin:20px 0;"></div> <table id="test" name="test"></table> <script type="text/javascript"> $(function(){ $('#test').datagrid({ title:'My DataGrid', iconCls:'icon-save', width:750, height:350, nowrap: true, autoRowHeight: false, striped: true, collapsible:true, //url:'test/easyui1.3.6/demo/datagrid/datagrid_data1.json', //url:null, sortName: 'code', sortOrder: 'desc', remoteSort: false, idField:'code', frozenColumns:[[ {field:'ck',checkbox:true}, {title:'Code',field:'code',width:80,sortable:true} ]], columns:[[ {title:'Base Information',colspan:3}, {field:'opt',title:'Operation',width:100,align:'center', rowspan:2, formatter:function(value,rec){ return '<span style="color:red">Edit Delete</span>'; } } ], [ {field:'name',title:'Name',width:120}, {field:'addr',title:'Address',width:220,rowspan:2,sortable:true, sorter:function(a,b){ return (a>b?1:-1); } }, {field:'col4',title:'Col41',width:150,rowspan:2} ]], pagination:true, rownumbers:true }); }); var jsdata= { "total":239, "rows":[ {"code":"001","name":"Name 1","addr":"Address 11","col4":"col4 data"}, {"code":"002","name":"Name 2","addr":"Address 13","col4":"col4 data"}, {"code":"003","name":"Name 3","addr":"Address 87","col4":"col4 data"}, {"code":"004","name":"Name 4","addr":"Address 63","col4":"col4 data"}, {"code":"005","name":"Name 5","addr":"Address 45","col4":"col4 data"}, {"code":"006","name":"Name 6","addr":"Address 16","col4":"col4 data"}, {"code":"007","name":"Name 7","addr":"Address 27","col4":"col4 data"}, {"code":"008","name":"Name 8","addr":"Address 81","col4":"col4 data"}, {"code":"009","name":"Name 9","addr":"Address 69","col4":"col4 data"}, {"code":"010","name":"Name 10","addr":"Address 78","col4":"col4 data"} ] }; $("#test").datagrid("loadData",jsdata); </script> </body> </html> 在火狐在调试报了以下的错误: TypeError: _690 is undefined var opts=_690.options; jquery.....min.js (第 9256 行,第 4 列) TypeError: aa[(_68a + r)] is undefined aa[_68a+r][_68b]=_68d; 原本以为是版本的bug,结果换了好几个版本都不行,是我调用loadData的方式出问题了吗?
1 下一页