ExtJS Window 最小化的一种方法
- 作者: 晨曦西
- 来源: 51数据库
- 2021-07-08
下面是通过重新它的minimize函数来实现的一种最小化方法:
html:
<input type="button" id="btn" value="openwin" onclick="openwin();" />
<div id="divwin"></div>
<a id="arestore" style="display:none">恢复</a>
js:
function openwin()
{
if(!win)
{
win = new ext.window({
title:"弹出窗口",
el:"divwin",
width:500,
height:300,
constrain:true,
maximizable:true,
closeaction:'hide',
minimizable:true
});
win.minimize = function(e)
{
this.hide();
ext.get("arestore").show();
}
}
win.show(ext.get("btn"));
ext.get("arestore").hide();
}
html:
复制代码 代码如下:
<input type="button" id="btn" value="openwin" onclick="openwin();" />
<div id="divwin"></div>
<a id="arestore" style="display:none">恢复</a>
js:
复制代码 代码如下:
function openwin()
{
if(!win)
{
win = new ext.window({
title:"弹出窗口",
el:"divwin",
width:500,
height:300,
constrain:true,
maximizable:true,
closeaction:'hide',
minimizable:true
});
win.minimize = function(e)
{
this.hide();
ext.get("arestore").show();
}
}
win.show(ext.get("btn"));
ext.get("arestore").hide();
}
推荐阅读