function easeMove(obj,attr,iTarget,speedScale,time){
clearInterval(obj.timer)
obj.timer=setInterval(function(){
var attrValue=getStyle(oAll,attr)*100;
var speedEnd = (iTarget - attrValue) / speedScale;
speedEnd=speedEnd>0?Math.ceil(speedEnd):Math.floor(speedEnd);
//console.log("计算速度值:"+speedEnd);
var isStop = true;
if(iTarget!=attrValue){
isStop=false;
obj.style[attr]=(attrValue+speedEnd)/100;
}if(isStop){
clearInterval(obj.timer);
}
console.log("attrValue:"+ obj.style[attr]);
},time);
}
//获得CSS样式属性值:
function getStyle(obj,attr){
if(obj.currentStyle){
//支持IE
return obj.currentStyle[attr];
}else{
return getComputedStyle(obj)[attr];
}
}