图片代码:
xtpl:new Ext.XTemplate('<tpl for=".">',
'<div class="thumb-wrap" id="img-{id}">',
'<div class="thumb"><img class="checkimg" src="'+Context.RESOURCE_URL+'{picAddress}" title="{name}" /></div>',
'<tpl if="status == 0"><span style="color:grey">未审核</span></tpl>',
'<tpl if="status == 1"><span style="color:green">通过</span></tpl>',
'<tpl if="status == 2"><span style="color:red" title="{unpassReason}">退回</span></tpl>',
'</div>',
'</tpl>',
'<div class="x-clear"></div>'
),
js代码:
$(function(){
$(".checkimg").click(function(){
var width = $(this).width();
var height = $(this).height();
alert(width);
if(width==80 || height==60)
{
$(this).width(450);
$(this).height(600);
}
else
{
$(this).width(80);
$(this).height(60);
}
});
});
js怎么才能作用到 img