自由時(shí)飛揚(yáng)

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            8 Posts :: 0 Stories :: 0 Comments :: 0 Trackbacks
          Ext.onReady(function(){
          	var _window = new Ext.Window({
          		title:"用戶登陸",
          		frame:true,
          		width:250,
          		height:130,
          		plain:true,
          		layout:"form",
          		labelWidth:45,
          		resizable:false,
          		constrain:true,
          		closeAction:"hide",
          		defaults:{xtype:"textfield",width:160},
          		bodyStyle:"padding:5px;",
          		listeners:{
          			"show":function(){
          				alert("窗口顯示");
          			},
          			"hide":function(){
          				alert("窗口隱藏");
          			}
          		},
          		items:[
          			{fieldLabel:"賬號"},
          			{fieldLabel:"密碼"}
          			],
          		buttons:[
          			{text:"確定",handler:function(){
          					var _coll = this.ownerCt.ownerCt.items;
          //					alert(this.ownerCt.ownerCt.title);
          					alert(_coll.first().getValue() + _coll.itemAt(1).getValue());
          				}
          			},
          			{text:"取消",handler:function(){
          					_window.hide();
          				}
          			}
          		]
          	});
          	
          	_window.render(Ext.getBody());
          	_window.show();
          });

           

          當(dāng)然,也可以用Ext.getCmp()來實(shí)現(xiàn),效果圖:

          未命名

          posted on 2010-11-26 09:20 selfly 閱讀(153) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 景泰县| 青冈县| 阳新县| 通辽市| 乌拉特中旗| 波密县| 南安市| 自贡市| 永宁县| 临潭县| 上饶市| 大田县| 济宁市| 西乡县| 榆中县| 高陵县| 镇康县| 思茅市| 商丘市| 潜山县| 怀仁县| 沁源县| 七台河市| 伊通| 名山县| 开化县| 鄂托克前旗| 额济纳旗| 思南县| 苏尼特右旗| 炉霍县| 南京市| 筠连县| 涿州市| 全椒县| 垫江县| 永胜县| 正宁县| 台南市| 且末县| 乌什县|