y393791327 2015-07-01 11:00 采纳率: 0%
浏览 2122
已采纳

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条回答 默认 最新

  • 斯洛文尼亚旅游 2015-07-01 11: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()
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?