//css
#enlarge1{position:absolute;width:100px; height:100px; border:1px solid
#000;}
#enlarge2{position:absolute; top:100px; width:100px; height:200px
;margin-top:20px; border:1px solid #000; }
#enlarge3{position:absolute;
top:10px; left:110px;width:200px; height:312px; margin-left:10px;
margin-top:-2px; border:1px solid #000; }
//html
id="enlarge2">
//js
function enlargeFc(id,x,y){
var
option=document.getElementById(id);
var
optionWidth=option.clientWidth;
var optionHeight=option.clientHeight;
option.οnmοuseοver=function(){
this.style.width=optionWidth*x+"px";
this.style.height=optionHeight*y+"px";
this.style.background="#0f0";
this.style.zIndex=100000;
}
option.οnmοuseοut=function(){
this.style.width=optionWidth+"px";
this.style.height=optionHeight+"px";
this.style.background="";
this.style.zIndex="auto";
}
}
enlargeFc("enlarge2",1,1);
//效果
原文:http://www.cnblogs.com/fangdx/p/3645386.html