代码:
//具体样式的更改可以修改 style元素
new Ext.FormPanel({
title: 'default',
width:300,
height: 300,
frame: true,
border:true,
renderTo:document.body,
layout:'form',
items:[
{
xtype : 'box',
autoEl : {
tag : 'a',
href : '#',
children : [{
tag : 'img',
'ext:qtip' : "Export PDF",
src : 'pdf.jpg'
}]
},
style : 'cursor:pointer;',
listeners : {
render : function(c) {
c.getEl().on('click', function() {
alert('click!!');
}, c, {stopEvent : true});
}
}
},
{
xtype : 'box',
autoEl : {
tag : 'a',
href : '#',
children : [{
tag : 'img',
'ext:qtip' : "Export Word",
src : 'word.jpg'
}]
},
style : 'cursor:pointer;',
listeners : {
render : function(c) {
c.getEl().on('click', function() {
alert('click!!');
}, c, {stopEvent : true});
}
}
}
]
})
截图:
FIRBUG 查看生成的代码: