Home > Web Front-end > JS Tutorial > body text

Learn ExtJS to access container objects_extjs

WBOY
Release: 2016-05-16 18:45:18
Original
962 people have browsed it
1. Attributes
ownerCt: Get the container where the current object is located.
items: collection list
2. Application examples
Copy code The code is as follows:

Ext.onReady(function(){
var _window = new Ext.Window({
title:"Test Form",
layout:"form",
width:300,
plain:true,
items:{
id:"name",
xtype:"textfield",
fieldLabel:"name"
},
buttons:[{
text:"OK",
handler:function(){
alert(this.ownerCt.ownerCt.items.first().getValue());
alert (this.ownerCt.ownerCt.items.itemAt(0).getValue()) ;
alert(Ext.getCmp("name").getValue()) ;
}
}]
}) ;
_window.show() ;
}) ;
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!