Mouse wheel to change the size of the image sample code

  • 2020-03-29 23:54:08
  • OfStack

Mouse wheel to change the size of the image sample code
< Script>
The function onWheelZoom (obj) {
              Zoom = parseFloat (obj. Style. Zoom);
              TZoom = zoom + (event. WheelDelta> 0? 0.05, 0.05);
              If (tZoom > 1 | | tZoom< 0.1) return true;
              Obj. Style. Zoom = tZoom;
              Return false;
}
< / script>
< A href = "javascript: window. Close ()" > < img

SRC = "/ / files.jb51.net/file_images/article/201311/20131120101711.png" style = "zoom: 1."

= 'return onmousewheel onWheelZoom (this)' > < / a>


Related articles: