兄弟,你应该在<img onload="resizeImage(this,100,100)">里做些小动作……/*图片自适应*/
function resizeImage(source,maxwidth,maxheight)
{
var width=source.width;
var height=source.height;
var scale=Math.max(width/maxwidth,height/maxheight);
if(scale>1)
source.width=width/scale;
}@_@
function resizeImage(source,maxwidth,maxheight)
{
var width=source.width;
var height=source.height;
var scale=Math.max(width/maxwidth,height/maxheight);
if(scale>1)
source.width=width/scale;
}@_@
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货