2 y393791327 y393791327 于 2015.07.01 19:00 提问

extjs4怎么刷新<iframe>
 var tab = Ext.create('Ext.TabPanel', {

        id:'myTabPanel',
        region:'center',
        layout: 'fit',
        itemId: 'center-tabs',

        items : [{ 
            id:'home',
            title : "Home Page",
            iconCls: 'House',
            html : '<iframe src= "jsp/homepage.jsp" width="100%" height="100%" marginwidth="0" framespacing="0" marginheight="0" frameborder="0" ></iframe>',
            /*loader: { url:'jsp/homepage.jsp', loadMask: 'loading...', autoLoad: true, scripts: true },*/
            listeners:{         
            activate:function(tab){ 
            }  
                 }

        }]
    });

试了好多方法都没用
this.loader.load();
tab.getUpdater().refresh();
this.getActiveTab().refresh();

2个回答

showbo
showbo   Ds   Rxr 2015.07.01 19:51
已采纳

给iframe增加id,用js更新就好

  html : '<iframe src= "jsp/homepage.jsp" id="myifr" width="100%" height="100%" marginwidth="0" framespacing="0" marginheight="0" frameborder="0" ></iframe>'
 document.getElementById('myifr').contentWindow.location.reload()
y393791327
y393791327   2015.11.27 08:51

top.document.getElementById('myifr').contentWindow.location.reload()

Csdn user default icon
上传中...
上传图片
插入图片