|
|
鼠标滚轮放大/缩小图片 |
|
|
<script language="javascript"> function zoomImg(img){ var zoom=parseInt(img.style.zoom,10) || 100; zoom += event.wheelDelta / 12; if (zoom>10 && zoom<400) img.style.zoom = zoom + "%"; return false; }
function document.onmousewheel(){ if(event.wheelDelta==120){ d.value="向前滚" } else{ d.value="向后滚" } } </script> <img src="http://www.blueidea.com/gg/qq/2.jpg" alt="鼠标滚轮放大/缩小图片" onmousewheel="return zoomImg(this)"> <input type="text" size=40 name=d>
缺缺 发表于 2004-8-12 [所属栏目: JScript | 返回首页]
|
|
|