扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Ajax综合示例在线演示:http://easyjweb.demo.easyjf.com/ajax2/
Ajax综合示例War包及源码:ftp://ftp1.easyjf.com/easyjweb/demo/ajax2.war (13M)
Ajax综合示例的源码:ftp://ftp1.easyjf.com/easyjweb/demo/ajax2-src.zip (665K)
代码摘要:
Ext.BLANK_IMAGE_URL = 'plugins/extjs/ext-2.0/resources/images/default/s.gif';
Ext.onReady(function()...{ 
var tree = new Ext.tree.TreePanel(...{
el:"tree-div",
autoScroll:true,
animate:true,
width:'100px',
height:'300px',
enableDD:true,
containerScroll: true, 
loader: new Ext.tree.TreeLoader(...{
dataUrl:'region.ejf?cmd=getRegion'
})
});
tree.on("click",function(node,event)...{alert(node.id);});
tree.on('beforeload',function(node)...{
tree.loader.dataUrl = 'region.ejf?cmd=getRegion&id='+(node.id!='root'?node.id:"");
}); 
var root = new Ext.tree.AsyncTreeNode(...{
text: '地区信息',
draggable:false,
id:'root'
});
tree.setRootNode(root);
tree.render();
root.expand();
});
示例截图:




原文链接:http://blog.csdn.net/easyjf/archive/2008/01/10/2033672.aspx
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。