学习ExtJS 访问容器对象
作者:bea
一、属性 ownerCt:得到当前对象所在的容器。 items:集合列表 二、应用举例 代码如下: Ext.onReady(function(){ var _window = new Ext.Window({ title:"测试窗体", layout:"form", width:300, plain:true, items:{ id:"name", xtype:"textfield", fieldLabel:"姓名" }, buttons:[{
一、属性
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() ;
}) ;
有用 | 无用
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() ;
}) ;
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- jQuery live( type, fn ) 委派事件实现
- 修改jQuery.Autocomplete插件 支持中文输入法 避免TAB、ENTER键失效、导致表单提交
- JS模拟的QQ面板上的多级可展开的菜单
- JavaScript 另类遍历数组实现代码
- js css样式操作代码(批量操作)
- javascript Range对象跨浏览器常用操作
- 防止动态加载JavaScript引起的内存泄漏问题
- JavaScript delete 属性的使用
- 有效的捕获JavaScript焦点的方法小结
- Javascript isArray 数组类型检测函数
- JavaScript 监听textarea中按键事件
- jquery 最简单的属性菜单
- Javascript 日期处理之时区问题
- 学习ExtJS table布局
- 学习ExtJS accordion布局
- 学习ExtJS form布局
- 学习ExtJS fit布局使用说明
- 学习ExtJS border布局
- 学习ExtJS Column布局