主题:求助,EXT的Tree
时间: 2020-08-27来源:ITEYE
前景提要
相关推荐: 从grid向tree的dd 基于ext2.0的含有checkBox的tree EXT2.0 checkbox树的扩展(支持单选,级联多选,只选叶子等) ExtTree例子 ext tree展开时的一些技巧 ExtJs之结构树 Ext.tree.panel详细用法 Ext tree 数据从后台读取 Extjs-树 Ext.tree.TreePanel
推荐群组: EXT
更多相关推荐
JavaScript EXT 页面<div id="main-ct" style="width:100%;height:100%;"></div> 脚本 Ext.onReady(function(){ var xt = Ext.tree; // turn on quick tips Ext.QuickTips.init(); var cview = Ext.DomHelper.append('main-ct', {cn:[{id:'main-tb'},{id:'cbody'}]} ); // create our layout var layout = new Ext.BorderLayout('main-ct', { center: { title:'Components', margins:{left:3,right:3,bottom:3,top:3} } }, 'main-ct'); layout.batchAdd({ center : { el: cview, autoScroll:true, fitToFrame:true, resizeEl:'cbody' } }); // the component tree var ctree = new xt.TreePanel('cbody', { animate:true, enableDD:true, containerScroll: true, lines:false, rootVisible:false }); var croot = new xt.AsyncTreeNode({ allowDrag:false, allowDrop:false, id:'croot', text:'Packages and Components', cls:'croot', loader:new Ext.tree.TreeLoader({ dataUrl:'/tmp1.json' }) }); ctree.setRootNode(croot); ctree.render(); croot.expand(); }); JSON文件 [{"text":"profil1@anonyme.ca", "id":"10\/1", "cls":"cmp", "leaf":false, "children":[{"text":"Favoris", "id":"10\/1\/favoris", "cls":"cmp", "leaf":false, "children":[{"text":"une Fiche", "id":"10\/1\/favoris\/idFiche", "cls":"cmp", "leaf":true, }, {"text":"un sous-dossier de Favoris", "id":"10\/1\/favoris\/sousDossier", "cls":"cmp", "leaf":false, "children":[{"text":"une Fiche", "id":"10\/1\/favoris\/idFiche", "cls":"cmp", "leaf":true}] }] }, {"text":"Poubelle", "id":"10\/1\/poubelle", "cls":"cmp", "allowDrop":true, "leaf":true} ] }] 我运行这个例子,在firefox下正常显示,而IE下却什么都不显示,看一下。谢谢了

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行