1. 显示图片
<!DOCTYPE html>
<html>
<head>
   <link href="./ext-6.0.0/build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
   <script type="text/javascript" src="./ext-6.0.0/build/ext-all.js"></script>
   <script type="text/javascript" src="./ext-6.0.0/build/packages/charts/classic/charts.js"></script>
   <script type="text/javascript">
      Ext.onReady(function() {
         Ext.create({
            xtype: 'draw',
            renderTo: Ext.getBody(),
            width: 600,
            height: 200,
            sprites: [{
               type: 'image',
               src : 'https://atts.w3cschool.cn/attachments/image/20170106/1483685153522480.jpg'
          }]
         });
      });
   </script>
</head>
<body>
</body>
</html>

2.添加文字

<!DOCTYPE html>
<html>
<head>
   <link href="./ext-6.0.0/build/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
   <script type="text/javascript" src="./ext-6.0.0/build/ext-all.js"></script>
   <script type="text/javascript" src="./ext-6.0.0/build/packages/charts/classic/charts.js"></script>
   <script type="text/javascript">
      Ext.onReady(function() {
         Ext.create({
            xtype: 'draw',
            renderTo: Ext.getBody(),
            width: 600,
            height: 200,
            sprites: [{
                type: 'text',
                x: 200,
                y: 100,
                text: 'W3Cschool',
                fontSize: 30,
                fillStyle: 'orange'
            }]
         });
      });
   </script>
</head>
<body>
</body>
</html>

零号
1 声望0 粉丝