`
sam406
  • 浏览: 57706 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

extjs的一些组件

    博客分类:
  • java
阅读更多
<script type="text/javascript">
  Ext.onReady(function(){
      //定义树的跟节点
  var rootNode = {
     text     : 'Root Node',
     expanded : true,
     children : [
         {
             text : 'Child 1',
             leaf : true
         },
         {
             text : 'Child 2',
             leaf : true
         },
         {
             text     : 'Child 3',
             children : [
                 {
                     text     : 'Grand Child 1',
                     children : [
                         {
                             text : 'Grand... you get the point',
                             leaf : true
                         }
                     ]
                 }
             ]
         }
     ]
}
var tree = {
     xtype      : 'treepanel',
     id         : 'treepanel',
     autoScroll : true,
     root       : rootNode
}
new Ext.Window({
     height     : 200,
     width      : 200,
     layout     : 'fit',
     border     : false,
     title      : 'Our first tree',
     items      : tree
}).show();
   });
</script>



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics