var toolBar = new Ext.Toolbar({
items:[{
xtype: 'tbtext',
text : '概要信息',
style:'font-size:12px;color:#006600;font-weight:bold;'
},"->",{
xtype : 'button',
text : '按钮',
width:85,
id:'test',
hidden: true,
handler :test
}]
});
var billPanel = new Ext.Panel({
tbar:toolBar,
frame : false,
border : false,
autoWidth : true,
autoHeight :true,
layout : 'column',
});
if (result.bill_status != '2'){
Ext.getCmp('test').hidden = false;
}
简单说就是button的属性hidden的控制
当满足某种提交时,就将hidden改为true,隐藏按钮
请采纳,谢谢