大家好~~关于回调或者setTimeout的使用 setTimeout时间参数设的稍大一些 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 this.moveImplement= function(){ alert("begin to start>>>"); while(this.xpos < this.x2 || this.ypos < this.y2){ this.xpos+=2; this.ypos+=2*(this.y2-this.y1)/(this.x2-this.x1); this.motodiv.style.left=this.xpos; this.motodiv.style.top=this.ypos; setTimeout("??",1000); }};??这里怎么写?可以实现动画? 时间已经不是问题了~怎么写哪个EXPRESSION? this.moveImplement= function(){ alert("begin to start>>>"); var self = this; var f = function(){self.move()}; this.timer = setInterval(f,1000); };this.move = function(){ if(this.xpos >= this.x2 && this.ypos >= this.y2) { clearInterval(this.timer); return; } this.xpos+=2; this.ypos+=2*(this.y2-this.y1)/(this.x2-this.x1); this.motodiv.style.left=this.xpos; this.motodiv.style.top=this.ypos;} 有段JS希望大家帮我看下 javascript操作word控件问题 首页效果太多,内存溢出啊 如何replace掉回车 某些网页的源码出现乱码 (急急急!!!)如何把js表单内的数据自动提交到数据库 我想去掉一段文本中所有的html标记,就是去掉包括<>在内的之间的内容,该怎么做? 有关对象不存在的问题. js深克隆 基于百度地图自由标注并显示文字、图片 100分求解VML问题:使用VML画线,帮顶的有分! 有偿求代码:javascript实现多国语言(包括欧洲、亚洲等语言)压缩字符串
{
alert("begin to start>>>");
while(this.xpos < this.x2 || this.ypos < this.y2){
this.xpos+=2;
this.ypos+=2*(this.y2-this.y1)/(this.x2-this.x1);
this.motodiv.style.left=this.xpos;
this.motodiv.style.top=this.ypos;
setTimeout("??",1000);
}
};
??这里怎么写?可以实现动画?
{
alert("begin to start>>>");
var self = this;
var f = function(){self.move()};
this.timer = setInterval(f,1000);
};
this.move = function(){
if(this.xpos >= this.x2 && this.ypos >= this.y2)
{
clearInterval(this.timer);
return;
}
this.xpos+=2;
this.ypos+=2*(this.y2-this.y1)/(this.x2-this.x1);
this.motodiv.style.left=this.xpos;
this.motodiv.style.top=this.ypos;
}