《SCRIPT》 var count = 10; function Picture() { count = Counting(count); Resize(count); return false; } function Counting(count){ if (event.wheelDelta >= 120) count++; else if (event.wheelDelta <= -120) count--; return count; } function Resize(count){ oImage.style.zoom = count + '0%'; oCounter.innerText = count + '0%'; } 《SCRIPT》 onmousewheel event This sample uses the onmousewheel event to expand or contract the picture below. Move the cursor over the picture and roll the mouse wheel up and down. Size = 100% http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.htm. [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
This sample uses the onmousewheel event to expand or contract the picture below. Move the cursor over the picture and roll the mouse wheel up and down.