请教我加了JSON后为啥不能运动了
<!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>
<style type="text/css">
#box {width:200px;height:200px;opacity:0.5;border:#333 1px solid;background:#3F9;opacity:0.5;filter:alpha(opacity:50);}
</style>
<script type="text/javascript">
window.onload=function(){
var box=document.getElementById("box");
box.onmouseover=function(){
move(box,{width:400,height:400,opacity:100});
}
box.onmouseout=function(){
move(box,{width:200,height:200,opacity:50});
}
}
function getStyle (obj,attr){
if(obj.currentStyle){
return obj.currentStyle[attr];
}
else{
return getComputedStyle(obj,false)[attr];
}
}
function move(obj,json,fn){
var flag=true;
clearInterval(obj.timer);
obj.timer=setInterval(function(){
for (var attr in jason)
{
var cur=0;
if (attr=='opacity')
{
var cur=Math.round(parseFloat(getStyle(obj,attr))*100);
}
else{
var cur=parseInt(getStyle(obj,attr));
}
var speed=(json[attr]-cur)/8;
speed=speed>0?Math.ceil(speed):Math.floor(speed);
if (cur!=json[attr])
{
flag=false;
}
if (attr=='opacity')
{
obj.style.filter='alhpa(opacity:'+(cur+speed)+')';
obj.style.opacity=(cur+speed)/100;
}
else{
obj.style[attr]=cur+speed+'px';
}
if (flag)
{
clearInterval(obj.timer);
if (fn)
{
fn();
}
}
}
},30)
}
</script>
</head>
<body>
<div id=box></div>
</body>
</html>