图片随滚轴缩放代码

<SCRIPT language=JavaScript>
<!--
function bbimg(o){
var zoom=parseInt(o.style.zoom, 10)||100;
zoom+=event.wheelDelta/12;
if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
//-->
</SCRIPT>

<IMG onmousewheel="return bbimg(this)" src="http://pop.pcpop.com/upimg2/2004/8/1/1372648770.jpg" onload="javascript:if(this.width>screen.width-500)this.style.width=screen.width-500;">

你可能感兴趣的:(JavaScript)