[网页]鼠标滚轮控制图片大小

<HTML>
<HEAD>
<TITLE>乡下人blog鼠标滚轮控制图片大小</TITLE>
<script language="JavaScript">
<!--
//改变图片大小
function resizepic(thispic)
{
if(thispic.width>700) thispic.width=700;
}
//无级缩放图片大小
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>
</HEAD>
<BODY>
<img src='http://xxrblog.cn/attachments/month_0803/3200834111411.jpg' onMouseWheel="this.style.zoom*= Math.pow(.9,Math.abs(event.wheelDelta)/event.wheelDelta);" onClick="this.style.zoom=1;" style="zoom=1;" />
<br><br><a href="http://xxrblog.cn/dh" target="_blank">乡下人blog</a>
</BODY>
</HTML>
原文网址:http://xxrblog.cn/article.asp?id=351
posted on 2008-12-17 11:11  草原和大树  阅读(974)  评论(0编辑  收藏  举报