作者在 2008-03-20 15:25:27 发布以下内容
groupwin.html:
groupwin.js:
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><
html><
head><
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><
title>Group Window</title><
link rel="stylesheet" type="text/css" href="exts/ext-all.css" /><
script type="text/javascript" src="exts/ext-base.js" ></script><
script type="text/javascript" src="exts/ext-all.js" ></script><
script type="text/javascript" src="js/groupwin.js" ></script></
head><
body><
div id="hello"></div><
input name="add" type="button" value="New window" id="btn"><
input name="add" type="button" value="Send back" id="btnToBack"><
input name="add" type="button" value="Hide all" id="btnHide"></
body></
html>groupwin.js:
Ext.onReady(
function(){var
i=0; var mygroup=new Ext.WindowGroup(); function newWin() {var
win=new Ext.Window({ title:"Window"+(i++),width:400,
height:300,
maximizable:
true,manager:mygroup
});win.show();
}function
toBack(){ mygroup.sendToBack(mygroup.getActive()); }function
hideAll(){ mygroup.hideAll(); } Ext.get("btn").on("click",newWin);Ext.get(
"btnToBack").on("click",toBack);Ext.get(
"btnHide").on("click",hideAll);}
);