木子屋 Dnawo's BLOG

图片适应屏幕并鼠标滚动缩放的代码

👤 dnawo 📅 2006-06-28 👁 6918 👍 0 💬 0 🔄 本站原创
<script language="javascript">
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>

<img SRC="pic/124.jpg" border=0 onmousewheel="return bbimg(this)" onload="javascript:if(this.width>screen.width-100)this.style.width=screen.width-100;">

评论(0)

暂无评论。

计算题
评论需审核通过后显示
← 上一篇 ASP数组 下一篇 → 解决局域网中XP互访