【www.gdgbn.com--php函数】

js setInterval函数实现教程

ImgRoll = Class.create();
ImgRoll.prototype = {
    
                initialize : function(Speed,Space,PageWidth){
     fun = this;
                },
                test : function(){
                        return "sss";
                },
                test1 : function(){
                        setInterval(function(){alert(fun.test());},2000);//得不到this.test()的值
                }
        }

        var ss = new ImgRoll("");
        ss.test1();

本文来源:http://www.gdgbn.com/jiaocheng/15632/