一个比较基础的问题
似梦飞花 2012-06-02 06:07:32 function Divmove(id){
this.div=document.getElementById(id);
this.x=0;
this.y=0;
//我在这里想用window.setInterval定时调用move1,该怎么写啊
}
Divmove.prototype.move1=function(){
this.x=4;
this.y=4;
this.div.style.left=parseInt(this.div.style.left)+this.x+"px";
this.div.style.top=parseInt(this.div.style.top)+this.y+"px";
//想在这里用window.setInterval调用其他的方法活window.setTimeout掉用自身,该怎么写啊 this指来指去的搞不懂啊
}
万分感谢