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();
}