ExtJS Window 最小化的一种方法
人气:0
下面是通过重新它的minimize函数来实现的一种最小化方法:
HTML:
<input type="button" id="btn" value="OpenWin" onclick="openWin();" />
<div id="divWin"></div>
<a href="javascript:openWin();" 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 href="javascript:openWin();" 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();
}
加载全部内容