鼠标滚动放大缩小图片

function resizepic(thispic)
{
 if(thispic.width>570) thispic.width=570;
 }
 
function

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

调用:

<A href="1.jpg"

target=_blank><IMG onmousewheel="return bbimg(this)" border=0 alt=""

src=“1.jpg" onload=resizepic(this)

></A>

原文地址:https://www.cnblogs.com/xusui/p/2284750.html