开发者社区> 问答> 正文

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();

展开
收起
小旋风柴进 2016-03-12 15:22:53 2102 0
1 条回答
写回答
取消 提交回答
  • 给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()
    2019-07-17 19:01:02
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载