案例:Extjs案例     状态:可编辑再运行    进入竖版
 运行结果 
AخA
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
   <link href="//cdn.bootcss.com/extjs/6.2.0/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
5
   <script type="text/javascript" src="//cdn.bootcss.com/extjs/6.2.0/ext-all.js"></script>
6
   <script type="text/javascript">
7
      Ext.onReady(function () {
8
         Ext.create('Ext.tab.Panel', {
9
            renderTo: Ext.getBody(),
10
            height: 100,
11
            width: 200,
12
            items: [{
13
               xtype: 'panel',
14
               title: 'Tab One',
15
               html: 'The first tab',
16
               listeners: {
17
                  render: function() {
18
                     Ext.MessageBox.alert('Tab one', 'Tab One was clicked.');
19
                  }
20
               }
21
               },{
22
               // xtype for all Component configurations in a Container
23
               title: 'Tab Two',
24
               html: 'The second tab',
25
               listeners: {
26
                  render: function() {
27
                     Ext.MessageBox.alert('Tab two', 'Tab Two was clicked.');
28
                  }
29
               }
30
            }]
31
         });
32
      });
33
   </script>
34
</head>
35
<body>
36
</body>
37
</html>