EXTJS系列笔记(4.X)————将控件加载到ExtJs中

1.用html这个属性
     直接html语言写在html这个属性上
     例如:
     html: '<OBJECT ID="" WIDTH="100%" HEIGHT="100%" CLASSID=""></OBJECT>'

2.先将html中的标签封装起来
     例:
         var spec = {
              id: 'mapObject',
              tag: 'object',
              width:'100%',
              height:'100%',
              classId:'CLSID:0594B0B8-11A4-4ABE-9030-927ED172133E',
              children: [
                  {tag: 'param', name: 'Version', value: '65536'},
                  {tag: 'param', name: '_ExtentX', value: '9149'},
                  {tag: 'param', name: '_ExtentY', value: '5366'},
                  {tag: 'param', name: '_StockProps', value: '0'}
              ]
     };
     html:spec  //加载html到这个属性中

     一般的控件会遮盖住extjs的弹出框,加上  Ext .useShims=true;//将弹出的窗口放置到最前层

     缺点:加上这一句以后,日期控件会出现毛病,第一次不能选择年月

猜你喜欢

转载自blog.csdn.net/java_dotar_01/article/details/86520112
今日推荐