<!DOCTYPE html>
<html>
   <head>
      <link href="./ext-6.0.0-gpl/ext-6.0.0/build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet">
      <script src="./ext-6.0.0-gpl/ext-6.0.0/build/ext-all.js"></script>
      <script type="text/javascript">
         Ext.onReady(function () {
          var component1 = Ext.create('Ext.Component', { //组件1
             html:'First Component'
          });
 
          var component2 = Ext.create('Ext.Component', {//组件2
             html: 'Second Component'
          });
 
          var component3 = Ext.create('Ext.Component', {//组件3
             html: 'Third Component'
          });
 
          var component4 = Ext.create('Ext.Component', {//组件4
             html: 'Fourth Component'
          });
 
          var container = Ext.create('Ext.container.Container', { //子容器
             style: {borderStyle: 'solid', borderWidth: '2px' },
             width: '50%',
             items: [component3, component4] //包含组件1和组件2
          });
 
          Ext.create('Ext.container.Container', {
             renderTo: Ext.getBody(),
             title: 'Container',
             border: 1,
             width: '50%',
             style: {borderStyle: 'solid', borderWidth: '2px' },
             items: [component1, component2,  container] //包含组件1、组件2和子容器
          });
       });
      </script>
   </head>
   <body>
   </body>
</html>

零号
1 声望0 粉丝