自由時飛揚

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            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();
          });

           

          當然,也可以用Ext.getCmp()來實現,效果圖:

          未命名

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

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


          網站導航:
           
          主站蜘蛛池模板: 山东| 定襄县| 阿坝| 垦利县| 西青区| 商洛市| 淮南市| 同德县| 繁峙县| 东阳市| 枝江市| 柳江县| 德昌县| 陵水| 沁水县| 巴彦淖尔市| 商丘市| 湘乡市| 三门县| 句容市| 昌平区| 德江县| 巴东县| 淮北市| 宣武区| 鹤庆县| 衡阳县| 阿克| 岳池县| 安平县| 遂平县| 延川县| 英德市| 尖扎县| 巴彦淖尔市| 龙州县| 科技| 运城市| 隆回县| 抚州市| 洪湖市|