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