一、属性
ownerCt:得到当前对象所在的容器。
items:集合列表
二、应用举例
复制代码 代码如下:
复制代码
Ext.onReady(function(){
var _window = new Ext.Window({
title:"测试窗体",
layout:"form",
width:300,
plain:true,
items:{
id:"name",
xtype:"textfield",
fieldLabel:"姓名"
},
buttons:[{
text:"确定",
handler:function(){
alert(this.ownerCt.ownerCt.items.first().getValue()) ;
alert(this.ownerCt.ownerCt.items.itemAt(0).getValue()) ;
alert(Ext.getCmp("name").getValue()) ;
}
}]
}) ;
_window.show() ;
}) ;
Ext.onReady(function(){
var _window = new Ext.Window({
title:"测试窗体",
layout:"form",
width:300,
plain:true,
items:{
id:"name",
xtype:"textfield",
fieldLabel:"姓名"
},
buttons:[{
text:"确定",
handler:function(){
alert(this.ownerCt.ownerCt.items.first().getValue()) ;
alert(this.ownerCt.ownerCt.items.itemAt(0).getValue()) ;
alert(Ext.getCmp("name").getValue()) ;
}
}]
}) ;
_window.show() ;
}) ;
最后
以上就是称心百褶裙最近收集整理的关于学习ExtJS 访问容器对象的全部内容,更多相关学习ExtJS内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复