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();
});
extjs版本? :o :o :o
IE几,,把使用环境报详细些~~
IE版本 :cry: :cry:
==看到了
[code="js"]buttons:[{
text:"ok",
scope:this,
handler:function() {
alert(this.ownerCt.title);
alert(this.ownerCt.ownerCt.title);
alert(this.ownerCt.items.itemAt(1).getValue());
}
},{
text:"cancel"
}]
}[/code]
改成
[code="js"]
buttons:[{
text:"ok",
handler:function() {
alert(this.ownerCt.title);
alert(this.ownerCt.items.itemAt(1).getValue());
}
},{
text:"cancel"
}]
}[/code]
去掉
scope:this,
和
alert(this.ownerCt.ownerCt.title);