87,910
社区成员
发帖
与我相关
我的任务
分享
<script>
function Obj(){
alert()
this.delay=1000;
}
Obj.prototype.update=function(){
alert("test");
var o=this;
setTimeout("Obj()",this.delay);
}
var obj=new Obj();
obj.update();
</script>
function Obj(){
this.delay=1000;
}
Obj.prototype.update=function(){
alert("test2");
setTimeout(this.update(),this.delay);//这里第一个参数填写什么才能延时后调用这个方法或者能使用其他方法实现该功能
}
var aaa = new Obj();
aaa.update();
function Obj(){
this.delay=1000;
}
Obj.prototype.update=function(){
alert("test");
setTimeout("function(){}",this.delay);
}