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();
时间: 2024-10-01 15:38:19