EasyUI出错 datagrid is not a function

EasyUI出错 datagrid is not a function

EasyUI 获取行数据出错

img


对应代码

 text:'删除',
        iconCls:'icon-cut',
        handler:function(){
            var row = $('#table').datagrid('getSelected');
            if (row){
                alert('Item ID:'+row.id+"Price:"+row.name);
            }
        }

easyUI类库js文件路径不对或者导入顺序错误,要先导如jquery,然后才是easyUI的类库js文件,顺序不能反

   <script type="text/javascript" src="../../jquery.min.js"></script>
   <script type="text/javascript" src="../../jquery.easyui.min.js"></script>

easyui相关js没有引用正确,没识别到 datagrid

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632

【相关推荐】




如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^