function Obj(){
   this.delay=1000;
}
Obj.prototype.update=function(){
   alert("test");
   setTimeout("???",this.delay);//这里第一个参数填写什么才能延时后调用这个方法或者能使用其他方法实现该功能
}

解决方案 »

  1.   


    function Obj(){ 
      this.delay=1000; 

    Obj.prototype.update=function(){ 
      alert("test"); 
      setTimeout("function(){}",this.delay);
    }
      

  2.   

    function Obj(){ 
      this.delay=1000; 

    Obj.prototype.update=function(){ 
      alert("test2"); 
      setTimeout(this.update(),this.delay);//这里第一个参数填写什么才能延时后调用这个方法或者能使用其他方法实现该功能 
    }
    var aaa = new Obj();
    aaa.update();
      

  3.   


    <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>