//通过 this.ownerCt.ownerCt.items获得值
Ext.onReady(function(){
win = new Ext.Window({
title : "测试",
width:300,
layout:'form',
closeAction:'hide',
plain: true,
items: [{
id : "textName",
xtype : "textfield",
fieldLabel:"姓名"
},{
id : "textPassword",
xtype : "textfield",
fieldLabel:"密码"
}],
buttons: [{
text:'确 定',
handler:function(){
/** 像上找两级*/
var _coll = this.ownerCt.ownerCt.items;
var _temp ="";
_temp += "姓名"+_coll.first().getValue();
alert(_temp);
// alert("用户名:"+Ext.getCmp("textName").getValue()
// +"密码"+Ext.getCmp("textPassword").getValue());
}
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});
win.show(this);
});
EXT3.0 this.ownerCt的用法
最新推荐文章于 2021-07-07 14:26:02 发布