0
。當我運行並點擊圖標按鈕時,它不能夠調用函數func_1();什麼都沒有出現。在屏幕上如何在extjs 3.4面板項中添加函數處理函數
Ext.onReady(function() {
function func_1() {
//some functionality
}
new_win = new Ext.Panel({
renderTo: Ext.getBody(),
activeItem: 0,
tbar: {
items: [{
text: 'List',
ref: '../prevButton',
disabled: true,
handler: function() {
new_win.getLayout().setActiveItem(0);
new_win.prevButton.disable();
new_win.nextButton.enable();
}
}, '-', {
text: 'Icon',
ref: '../nextButton',
handler: function() {
new_win.getLayout().setActiveItem(1);
new_win.prevButton.enable();
new_win.nextButton.disable();
}
}]
},
items: [{
html: 'hello'
}, {
handler: function() {
func_1();
}
}]
});
});
你能告訴我如何調用func_1();或面板項目中的處理程序?