鼠标滑轮滚动,图片大小变化

     

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>鼠标滚动图片变大</title>

<script language = "JavaScript">

var _st = window.setTimeout;

window.setTimeout = function(fRef, mDelay) {

 if(typeof fRef == 'function'){

  var argu = Array.prototype.slice.call(arguments,2);

  var f = (function(){ fRef.apply(null, argu); });

  return _st(f, mDelay);

 }

 return _st(fRef,mDelay);

}

function bbimg(o){

 var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';

 return false;

}

 function setSize(o){

      setSizeOnly(o);

   if(o.width==0) {window.setTimeout(setSizeOnly,1000,o);}

 }

 function setSizeOnly(o){

    if(o.width>720) {o.width=720; return;}

 

 }

 function setSizeUser(o){

      setSizeOnlyUser(o);

   if(o.width==0) {window.setTimeout(setSizeOnlyUser,1000,o);}

 }

 function setSizeOnlyUser(o){

    if(o.height>180) o.height=180;

    if(o.width>720) o.width=720;

    return;

}

 function doZoom(size){

  document.getElementById('font').style.fontSize=size+'px';

 }

</script>

</head>

<body> 

<a onfocus=this.blur() target=_blank><IMG SRC='http://upload2007.cnool.net/files2007/20090112/2009011211193137068.jpg' border=0 onmousewheel='return bbimg(this)' onload='return setSizeUser(this)'/></a> 

</body>

</html>

郑重声明:资讯 【鼠标滑轮滚动,图片大小变化】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——