Extjs中如何关闭parent对象窗口打开的window对象
来源:互联网 发布:校园网络广播系统方案 编辑:程序博客网 时间:2024/04/28 14:55
有a,b两个页面,a页面为主页面,有按钮一个,点击按钮弹出一个windows对象,在其中显示b页面。b页面中也有一个按钮,点击关闭窗口。
<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()">
b.htm(部分代码)
<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对象
- JavaScript中的Window对象(打开新的窗口)
- 由window.open打开的窗口如何通知父窗口自己已经关闭
- window.open 打开子窗口,关闭所有的子窗口
- 通过<frameset>和<iframe>看JavaScript中window对象parent、self、top的区别
- 通过<frameset>和<iframe>解析js中window对象parent、self、top的区别
- PB打开窗口、数据窗口等对象时自动关闭的解决方法
- 关于JavaScript的window对象的opener及parent属性
- window.showModalDialog在第二个窗口中获取第一个窗口的window对象
- JS window对象的top、parent、opener含义
- JS window对象的top、parent、opener含义
- JS window对象的top、parent、opener含义介绍
- JS window对象的top、parent、opener含义
- JS window对象的top、parent、opener含义
- C++笔记3
- PHP中使用pcntl和libevent实现Timer功能
- php将数组写入文档
- non arc 工程 添加 arc 代码
- 获取中華民國时间
- Extjs中如何关闭parent对象窗口打开的window对象
- C# 模拟表单 post数据 文件 和 文本 HttpWebRequest
- 读书有感
- 黑马程序员——java编程那些事儿____面向对象(三)
- longest consecutive elements sequence
- UVa 490 - Rotating Sentences
- Linux内核源码分析--内核启动之(1)zImage自解压过程(Linux-3.0 ARMv7)
- centos 终端界面代理设置
- json到objectc互转的类,自动枚举类属性