- new Ext.Panel({
- renderTo:"hello-dialog",
- id:"hello-dialog",
- title:"面板头部header",
- width:300,
- height:200,
- html:'< iframe name="main" src="test.jsp"></iframe>',
- tbar:[{text:'顶部工具栏topToolbar'}],
- bbar:[{text:'底部工具栏bottomToolbar'}],
- buttons:[{text:"按钮位于footer"}]
- });
- 当需要修改上边 iframe 中 src 中的 test.jsp 的时候,或者是向 test.jsp 传入新的参数的时候。
- 我们可以 用如下方式
parent.main.location.href 来修改和使用。
可以用 alert(parent.main.location.href); 查看其中的值
本文介绍如何在ExtJS框架中使用iframe元素,并演示了如何动态更改iframe的src属性及向其传递参数的方法。通过使用parent.main.location.href,可以轻松实现iframe内容的更新。
1万+

被折叠的 条评论
为什么被折叠?



