sencha在list中如果使用XTemplate似乎是没有法子控制img标签的事件
var myTemplate = new Ext.XTemplate(
'<td width="40" rowspan="3"><img src="avatar/{account}.png" width="36" height="36" οnerrοr="noimage(this)" />',
);
所以在img的onerror事件中写函数 noimage,然后函数加在那里呢?
加在list的html实验不成功
最后加载index.html中靠谱
function noimage(img) {
img.src='resources/img/ic_contact.png';
}