ext加载icon相对比较的简单:
iconCls:"user",
renderTo:'btn',
});
1.css中
.logoff {
background-image: url(../../images/account/logoff.png ) !important;
}
2.jsp中引入这个css
3.js中使用:
new Ext.Button({
text:'User', iconCls:"user",
renderTo:'btn',
});
代码是这样的!不过在加入了图片之后,需要重新启动服务。否则加载图片的时候加载不出来!