我的不行耶
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
div{width:200px;height:124px;background:#966;position:absolute;left:100px;top:100px;
filter:alpha(opacity:30);
opacity:0.3;}
</style>
</head>
<body >
<div id="div">
</div>
</body>
<script>
window.onload=function(){
var oiv=document.getElementById("div");
oiv.onmouseover=action(100);
oiv.onmouseout=action(30);
};
var timer=null;
var alpha=30;
function action(iTarget){
var oiv=document.getElementById("div");
clearInterval(timer);
timer=setInterval(function(){
var speed=0;
if(alpha==iTarget){clearInterval(timer);}
else{
if(alpha>iTarget){speed=-10;}
else{speed=10;};
alpha+=speed;
oiv.style.filter='alpha(opacity:'+alpha+')';
oiv.style.opacity='alpha/100';
}
},20)
}
</script>
</html>