Extjs中如何关闭parent对象窗口打开的window对象
2010-07-26 09:25
477 查看
<script type="text/javascript"> function openWindow(id,title,url,width,height){ var win = Ext.get(id) if (win) { win.close(); return; } win = new Ext.Window({ id:id, title:title, layout:'fit', width:width, height:height, closeAction:'close', collapsible:true, plain: false, resizable: true, html : '<iframe frameborder="0" width="100%" height="100%" src="'+url+'"></iframe>' }); win.show(); } function myfunction(){ openWindow('b-win','窗口中打开b页面','b.htm',400,300); } </script> <input type="button" name="button1" value="打开窗口" onClick="myfunction()"> |
<script type="text/javascript"> function closewin(){ var win = parent.Ext.getCmp('b-win'); if (win) {win.close();} } </script> <input type="button" name="button1" value="关闭a打开的窗口" onClick="closewin()"> |
相关文章推荐
- Extjs中如何关闭parent对象窗口打开的window对象
- Extjs中如何关闭parent对象窗口打开的window对象
- Extjs中如何关闭parent对象窗口打开的window对象
- Extjs中如何关闭parent对象窗口打开的window对象
- Extjs中如何关闭parent对象窗口打开的window对象
- 子窗口在用window.open()方法打开后,如何关闭后刷新父窗口
- 由window.open打开的窗口如何通知父窗口自己已经关闭
- JavaScript权威指南_107_第14章_Window对象_14.8-多窗口和窗体-打开和关闭窗口
- 如何用window.showModalDialog打开弹出子窗口,并在子窗口关闭时刷新父窗口
- Example001使用window对象打开窗口
- showModalDialog 打开子窗口,用window.close关闭不了窗口
- 解决extjs在firefox中关闭窗口再打开后iframe中js函数访问不到的问题
- 火狐,chrome等非IE浏览器使用window.open打开子窗口,父窗口意外关闭
- js关闭当前窗口,window.close()方法只能是window.open打开的才能执行关闭
- 用javascript实现控制打开网页窗口的大小 和HTML如何关闭窗口的技巧大全
- Extjs打开window窗口自动加载html网页
- window.open,自动打开新窗口并且自动关闭新窗口,可以作为增加点击率使用
- window下批处理:打开命令窗口且执行后不关闭
- 如何判断窗口已打开或已关闭
- c#中如何打开一个新窗口并且 关闭当前的窗口