87,915
社区成员
发帖
与我相关
我的任务
分享
var top1=document.getElementById("live1").style.top;
var a1,b1,fn,fnx,topx;
if(parseInt(top1)==50){
a1=50;
b1=639;
}
var udx1=function(){
if(a1<b1){
a1++;
console.log(a1);
document.getElementById("live1").style.top=a1;
if(a1==639){
return a1;
}
}
}
while(!topx){
topx = udx1();
}
alert(topx);
这是你要的效果吧。。