日期:2014-05-16 浏览次数:20734 次
var _colgrid = Ext.create('Ext.grid.Panel',{ tbar:[ new Ext.form.TextField({}), { text:'名称查询', iconCls:'select', handler:function(x){ //var text = _colgrid.query('#textField'); var text = x.ownerCt(); alert(text); } },'->',{ id:'refbtn', text:'刷新', iconCls:'reficon', handler:function(){ _comdata.load(); } } ],
假如:new Ext.form.TextField({id:'textName'}) 直接用:var text = textName.value 或者: var text = Ext.getCmp('textName').getValue();