如何给images添加事件。我的代码main_panel.add({
id : 'item' + (i + 1),
title : i + 1 + "号仓门",
anchor : '20%',
items : [{
id : 'img' + (i + 1),
// hidden:true,
xtype : 'box',
width : 70,
height : 60,
style : '',
autoEl : {
tag : 'img',
src : imgSrc
// 指定url路径
},
listeners : {
"click" : function() {
Ext.Msg.alert("提示",
"欢迎学习ExtJS。");
}
}
}]
});