Ext.onReady(
function() {
var _window = new Ext.Window({
renderTo:Ext.getBody(),
title:"登录窗体",
layout:"form",
width:250,
plain:true,
items:[{
xtype:"textfield",
fieldLabel:"name"
},{
xtype:"textfield",
fieldLabel:"password"
}],
buttons:[{
text:"ok",
handler:function() {
alert(this.findParentByType("window").title);
alert(this.ownerCt.ownerCt.title);
alert(this.ownerCt.items.itemAt(1).getValue());
}
},{
text:"cancel"
}]
});
_window.show();
});