打印本文 打印本文 关闭窗口 关闭窗口
通过Javascript代码来使用鼠标的中键
作者:武汉SEO闵涛  文章来源:敏韬网  点击数776  更新时间:2009/4/23 11:22:07  文章录入:mintao  责任编辑:mintao

  第一步:把下列代码放到<head>.........</head>中

<script>
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>

  第二步:把下列代码放到<body>......</body>中:

<a onfocus=this.blur() href=" http://www.webjx.com/img2/dw0501101-13.gif";  target=_blank title=新窗口打开><img SRC=" http://www.webjx.com/img2/dw0501101-13.gif";  border=0  onmousewheel="return bbimg(this)" onload="javascript:if(this.width>screen.width-500)this.style.width=screen.width-500;"></a>

  本人测试时使用的是IE6.0,其他的浏览器不知道支持不?大家可以自己去测试一下

打印本文 打印本文 关闭窗口 关闭窗口