EXT JS iframe调整大小和包含extJS容器的宽度

时间:2016-06-22 17:20:44

标签: html extjs extjs4 extjs4.1 extjs4.2

我在EXT JS容器中渲染了一个iframe。当我点击提交按钮时,一个iframe来源" www.totalgadha.com"正在加载到容器中。但是我希望加载的页面适合容器的大小而不是滚动。如何将iframe调整为EXT JS容器的大小? 小提琴链接是:

https://fiddle.sencha.com/#fiddle/1cge

1 个答案:

答案 0 :(得分:1)

试试此代码

Ext.getCmp('mainpanel').add({
        xtype: "component",
        width: 500,
        height: 750,
          autoEl: {
            tag: 'iframe',
            height: '100%',
            width: '100%',
            border: '0',
            frameborder: '0',
            scrolling: 'no',
              src: 'https://www.totalgadha.com'
            }
      });