创建一个登录窗口
1 Ext.onReady(function(){
2 var _window = new Ext.Window({
3 title:"用户登陆",
4 frame:true,
5 width:500,
6 height:260,
7 plain:true,
8 layout:"form",
9 labelWidth:45,
10 resizable:false,
11 constrain:true,
12 closeAction:"hide",
13 defaults:{xtype:"textfield",width:320},
14 bodyStyle:"padding:5px;",
15 listeners:{
16 "show":function(){
17 alert("窗口显示");
18 },
19 "hide":function(){
20 alert("窗口隐藏");
21 }
22 },
23 items:[
24 {fieldLabel:"账号"},
25 {fieldLabel:"密码"}
26 ],
27 buttons:[
28 {text:"确定"},
29 {text:"取消",handler:function(){
30 _window.hide();
31 }
32 }
33 ]
34 });
35 _window.render(Ext.getBody());
36 _window.show();
37 });
浙公网安备 33010602011771号