window表示应用程序的窗口,其实就是一个浮动的层,直接调用show方法显示窗口,窗口有关闭按钮。
<HTML>
<HEAD>
<TITLE>使用EXT输出HelloWorld</TITLE>
<!-- 导入extjs配置 … ... -->
<link rel="stylesheet" type="text/css" href="./../ext/resources/css/ext-all.css"/>
<script type="text/javascript" src="./../ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="./../ext/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL='./../ext/resources/images/default/s.gif';
var _win = new Ext.Window({
width: 300,
height: 300,
maximizable: true,
minimizable: true,
tools:[{id: 'save'},{id: 'print'}],
tbar:[{text: '工具栏1'},{text: '工具栏2'}],
autoLoader: 'new.html',
minimize: function(){_win.hide();},
buttons:[{
text: '按钮一',
listeners:{
"click":function(){
var children = new Ext.Window({
width: 300,
height: 200,
modal: true,
closeAction: "hide"
});
children.show();
}
}
},{
text: '按钮二'
}]
});
_win.show();
});
</script>
</HEAD>
<body id="form">
</body>
</HTML>
,窗口的隐藏使用hide方法,使用modal属性来配置模式窗口。
4666

被折叠的 条评论
为什么被折叠?



