bbimg,imgzoom
来源:互联网 发布:java简单借书系统 编辑:程序博客网 时间:2024/05/16 13:48
function bbimg(o)...{
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
function imgzoom(img,maxsize)...{
var a=new Image();
a.src=img.src
if(a.width > maxsize * 4)
...{
img.style.width=maxsize;
}
else if(a.width >= maxsize)
...{
img.style.width=Math.round(a.width * Math.floor(4 * maxsize / a.width) / 4);
}
return false;
}
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
function imgzoom(img,maxsize)...{
var a=new Image();
a.src=img.src
if(a.width > maxsize * 4)
...{
img.style.width=maxsize;
}
else if(a.width >= maxsize)
...{
img.style.width=Math.round(a.width * Math.floor(4 * maxsize / a.width) / 4);
}
return false;
}