[英]ExtJS handler in button
我對簡單按鈕有疑問。
下面的定義:
var table = null;
var buttonConfig = {
buttonId: 'mybutton1',
text: 'Template button',
icon: 'style/img/fam/button.png',
tooltip: 'template button',
handler: function () {
var someConfig = null;
fileProcessing(someButton, someConfig);
}
};
addButtonToGrid(table, buttonConfig);
名為fileProcessing
函數有2個args- someButton
和someConfig
。
我想傳入someButtton
,這是來自對象buttonConfig
的按鈕。 我該怎么辦?
感謝您的任何建議
您可以按照以下方式進行操作:
handler: function () {
var someConfig = null;
var someButton = this;
fileProcessing(someButton, someConfig);
}
參數
按鈕:外部按鈕
此按鈕。
e:Ext.event.Event
點擊事件。
希望這會對您有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.